Test::Kit::Features - Features available for Test::Kit.
Test::Kit::Features
Test::Kit
Version 0.100
explain
use Test::Kit '+explain';
This exports an &explain function into your namespace. It's like &diag, but only runs if your tests are being run in verbose mode prove -v.
&explain
&diag
prove -v
If any references are passed, it uses Data::Dumper to display the references.
Data::Dumper
on_fail
use Test::Kit '+on_fail';
This exports an &on_fail function into your namespace. When called, if any subsequent tests fail, it will execute the 'on_fail' subroutine passed in.
&on_fail
The function receives one argument, an object with the following methods:
name
The 'name', if any, passed to the test function. For example:
ok $value, 'The value should be true';
The 'name' is "The value should be true".
package
The package the test function was called in.
filename
The name of the file the test function was called in.
line
The line number of the file the test function was called in.
To install Test::Kit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Kit
CPAN shell
perl -MCPAN -e shell install Test::Kit
For more information on module installation, please visit the detailed CPAN module installation guide.