+2.001 Jul 23 2010
+ - add documentation for DwarnN
+
+2.000 Jul 22 2010
- remove Dumper() returning object
- add DwarnN
- add DwarnL
use 5.006;
-$VERSION = '2.000';
+$VERSION = '2.001';
require Exporter;
require Data::Dumper;
instead of the default Data::Dumper output:
$VAR1 = {
- 'quux' => sub { "DUMMY" },
- 'foo' => 'bar
+ 'quux' => sub { "DUMMY" },
+ 'foo' => 'bar
baz'
};
warn Dumper(@return);
return @return;
+If you want to label your output, try DwarnN
+
+ use Data::Dumper::Concise::Sugar;
+
+ return DwarnN $foo
+
+is equivalent to:
+
+ use Data::Dumper::Concise;
+
+ my @return = some_call(...);
+ warn '$foo => ' . Dumper(@return);
+ return @return;
+
=head1 DESCRIPTION
use Data::Dumper::Concise::Sugar;
-will import Dwarn, DwarnL, and DwarnS into your namespace. Using L<Exporter>, so see
-its docs for ways to make it do something else.
+will import Dwarn, DwarnL, DwarnN, and DwarnS into your namespace. Using
+L<Exporter>, so see its docs for ways to make it do something else.
=head2 Dwarn
sub DwarnS ($) { warn Data::Dumper::Concise::Dumper $_[0]; $_[0] }
+=head2 DwarnN
+
+ sub DwarnN { warn '$argname => ' . Data::Dumper::Concise::Dumper $_[0]; $_[0] }
+
=head1 TIPS AND TRICKS
=head2 global usage
Devel::Dwarn - return Dwarn @return_value
=head1 SYNOPSIS
- use Data::Dumper::Concise::Sugar;
+
+ use Devel::Dwarn;
return Dwarn some_call(...)
but shorter. If you need to force scalar context on the value,
- use Data::Dumper::Concise::Sugar;
+ use Devel::Dwarn;
return DwarnS some_call(...)
If you need to force list context on the value,
- use Data::Dumper::Concise::Sugar;
+ use Devel::Dwarn;
return DwarnL some_call(...)
warn Dumper(@return);
return @return;
+If you want to label your output, try DwarnN
+
+ use Devel::Dwarn;
+
+ return DwarnN $foo
+
+is equivalent to:
+
+ use Data::Dumper::Concise;
+
+ my @return = some_call(...);
+ warn '$foo => ' . Dumper(@return);
+ return @return;
+
=head1 TIPS AND TRICKS
=head2 global usage