logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Test2::Tools::Explain -- Explain tools for Perl's Test2 framework

Acknowledgements

       The  code for "explain" is originally from "Test::More" by Michael Schwern, who took it from "Test::Most"
       by Curtis Poe.

Author

       Andy Lester, "<andy at petdance.com>"

Bugs

       Please report any bugs or feature requests to <https://github.com/petdance/test2-tools-explain>.  I will
       be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Exports

       All functions in this module are exported by default.

Name

       Test2::Tools::Explain -- Explain tools for Perl's Test2 framework

Subroutines

explain(@things_to_explain)
       Will convert the contents of any references in a human readable format, and return them as strings.
       Usually you want to pass this into "note" or "diag".

       Handy for things like:

           is( $errors, [], 'Should have no errors' ) or diag explain( $errors );

       Note that "explain" does NOT output anything.

Support

       You can find documentation for this module with the perldoc command.

           perldoc Test2::Tools::Explain

       You can also look for information at:

       •   GitHub project page

           <https://github.com/petdance/test2-tools-explain>

       •   Search CPAN

           <http://search.cpan.org/dist/Test2-Tools-Explain/>

       •   AnnoCPAN: Annotated CPAN documentation

           <http://annocpan.org/dist/Test2-Tools-Explain>

       •   CPAN Ratings

           <http://cpanratings.perl.org/d/Test2-Tools-Explain>

Synopsis

       Test2::Suite dropped the "explain()" function that had been part of Test::More.  For those who miss it in
       Test2, you can use Test2::Tools::Explain.

           use Test2::Tools::Explain;

           my $errors = fleeble_the_whatzit();
           is( $errors, [], 'Should have no errors from fleebling' ) or diag explain( $errors );

Version

       Version 0.02

See Also