use Badger::Test debug => 'Your::Forager Your::Pirate::Base', args => \@ARGV, tests => 42; ok("Loaded OK"); ...etc...
$ perl t/example/point.t -h Options: -d --debug Enable debugging -t --trace Enable stack tracing -c --colour/--color Enable colour output -s --summary Display summary of test results -h --help This help summary
Thus Spake Andy:
The final thing I want to show you is
Badger::Test. This is just like
every other test module ever written with the addition of some extra
niceties to integrate with various Badger bits. In the above example,
we use the
debug option to indicate what modules we're testing and might
need to debug. We give it a reference to the command line arguments along
with the number of tests that we're running. Now we can run the test
script with a
-h option to see what options are supported.
-d option enables debugging in those modules listed above. So you'll
see all the debugging messages embedded in
go whizzing past on the screen. The
-t option enables stack tracing in
Badger::Exception. This allows you to inspect all the information in the
caller stack at the time the exception got thrown. The
-c option adds
colour to the test output. Now you might think this is rather frivolous but
I'd like to demonstrate how useful it can be by means of an example. So
we're going to play a game of "Spot the Error".