Test::Most 0.20_02

Ovid on 2008-11-27T15:02:51

I've released a new developer version of Test::Most, 0.20_02. This offers the feature I was promising a few days ago:

use Test::Most 'no_plan';

ok 1;
my ( $foo, @bar ) = qw( this is a list );
show $foo, \@bar;
__END__
# $foo = 'this';
# @bar = (
#          'is',
#          'a',
#          'list'
#        );

Yup. You get variable names now. If you do testing, let me know if you like this.

It only displays lexicals (I haven't figured out the best way of getting the names of globals yet) and won't show 'containers', something Data::Dumper::Simple handles quite nicely:

$ perl -MData::Dumper::Simple -le 'print Dumper($ENV{PAGER})'
$ENV{PAGER} = 'less';

I suppose I could try an option where you specifically ask for Data::Dumper::Simple behavior instead of Data::Dumper::Names, but the former uses a source filter and the latter does not. That's why I want Perl 6 now. I can do this much more easily, no filters required :/