Test::Bomb - a test which succeeds until a deadline passes ( a time bomb )
version 0.007
use this test to ignore part of your system until a deadline passes. After the deadline the test will fail unless you replace it. I use it for large projects where I want to forget about some subsystems until after other parts are done.
usage( in a test script ):
bomb -after => 'Jan 31 2011';
before Jan 31 prints:
ok 1 - bomb after Jan 31 2011
after deadline prints
nok 1 - deadline passed
using bomb groups:
bomb -with => 'pluginSystem' ;
looks for 'pluginSystem' in the config file and uses the date assigned there to exire the test.
Test::Bomb
this is a development tool. if you release code that uses this test I expect you will have some very upset users.
this is a list of filenames where the test will look to find bomb groups. File format is:
name=date
all whitespace is ignored. everything on the matching line is used for the test. Non-matching lines are ignored.
The first file found is used, the first file checked is the environment variable TESTBOMBCONFIG followed by [.]tbc and [.]testbombconfig in various places
This variable allow groups to be assigned programatically. Just assign hash element for the name of the group like this:
$Test::Bomb::group{DateCalculations} = 'Jan 1, 2000'; # RIP Y2K :)
Probably inside some module included by each test script so that they all get the same date;
find more ways to check to see if the user is building a release. if that is the case then fail.
bomb is automatically exported; if you don't want to use the function why did you use the package?
acts like a test; errors cause test failure
look for a group name in a config file
compare the expiration date with today
check for various signs of project release so we can fail if a release is being generated ( perhaps there should be a way to override this for testing purposes.. )
NOTE: any flags added here need to be undone at the top of the test script; otherwise every test will fail when distributing this package
David Delikat, <david-delikat at usa.net>
<david-delikat at usa.net>
Please report any bugs or feature requests to bug-test-bomb at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=test-bomb. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-test-bomb at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Test::Bomb
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=test-bomb
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/test-bomb
CPAN Ratings
http://cpanratings.perl.org/d/test-bomb
Search CPAN
http://search.cpan.org/dist/test-bomb/
Copyright 2011 David Delikat.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
David Delikat <david-delikat@usa.net>
This software is copyright (c) 2011 by David Delikat.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::Bomb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Bomb
CPAN shell
perl -MCPAN -e shell install Test::Bomb
For more information on module installation, please visit the detailed CPAN module installation guide.