NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
I really like the idea .. (Score:1)
sub explain {return unless $ENV{TEST_VERBOSE};
Test::More::diag(
map{
ref $_ ? do {
require Data::Dumper;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Sortkeys = 1;
Data::Dumper::Dumper($_);
} : $_
} @_
);
}
This would allow for nifty stuff like:
my $self = Some::Object->new($id);explain 'I just created', $self;
Cheers, Sebastian
Reply to This