Subject: | Add stringify capability |
When the ok surroutine first or second arguments is an array or hash reference, and there is a code reference, supplied either as PERL_TEST_STRINGIFY environment or a perhaps global $Test::stringify=\&subroutine, pass the argument through the subroutine as follows:
ok_first_argument = &$stringify(ok_first_argument);
ok_second_argument = &$stringify(ok_second_argument);
There are quite a few stringify subroutines available such as the
Dumper subroutine in the Data::Dump package and the stringify subroutine
in the Data::Secs2 package.
use Data::Secs2;
$Test::stringify = \&stringify;
my @list = (1+1,5-2;
ok [@list],[2,3]; # compare contents of a list
What proposing in short is to move this capabilitity from Test::Tech to Test and could be very similar to what was done with PERL_TEST_DIFF in 1.25