less confusing abstract
[p5sagit/Data-Dumper-Concise.git] / lib / Devel / Dwarn.pm
index 8211cf1..bb1b0a8 100644 (file)
@@ -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