X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FDwarn.pm;h=bb1b0a8fb86be5481a91dead56f2d44b5f75518e;hb=fb92321a1a6302ad90d89d2ff3616c1babbd29b0;hp=8211cf186fe6068b83287ebb116794d65643c0ee;hpb=9469b5b08a5f4294df2036931af772deb07def04;p=p5sagit%2FData-Dumper-Concise.git diff --git a/lib/Devel/Dwarn.pm b/lib/Devel/Dwarn.pm index 8211cf1..bb1b0a8 100644 --- a/lib/Devel/Dwarn.pm +++ b/lib/Devel/Dwarn.pm @@ -8,7 +8,7 @@ sub import { =head1 NAME -Devel::Dwarn - return Dwarn @return_value +Devel::Dwarn - Combine warns and Data::Dumper::Concise =head1 SYNOPSIS @@ -72,6 +72,22 @@ is equivalent to: warn '$foo => ' . Dumper(@return); return @return; +If you want to output a reference returned by a method easily, try $Dwarn + + $foo->bar->{baz}->$Dwarn + +is equivalent to: + + my $return = $foo->bar->{baz}; + warn Dumper($return); + return $return; + +If you want to immediately die after outputting the data structure, every +Dwarn subroutine has a paired Ddie version, so just replace the warn with die. +For example: + + DdieL 'foo', { bar => 'baz' }; + =head1 TIPS AND TRICKS =head2 global usage