- or download this
#!/usr/bin/perl -w
use strict;
...
rename $thing, $thing.".archive" or warn "Couldn't archive $th
+ing: $!";
TRACE("Tried to archive $thing");
}
- or download this
package MyModule;
...
#Stubs for Tracing
sub TRACE {}
sub TRACE_HERE {}
- or download this
use MyModule;
use Tracing;
...
MyModule::my_routine();
MyModule::my_other_routine();
- or download this
package MyModule;
use Assertions 'die';
...
# ...
}
}
- or download this
use Assertions 'test';
plan tests;
...
ASSERT(EQUALS_FILE($returned, 'expected.txt'), 'munge_data is good
+ at munging');
ASSERT(DIED(sub { $object_to_test->method(@bad_inputs) }));