Test2::Tools::Explain(3pm)

Test2::Tools::Explain3pm

Usage

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

Exports

All functions in this module are exported by default.

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>

Acknowledgements

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

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

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.

From libtest2-tools-explain-perl 0.02-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.