BEGIN { @ISA = qw(Exporter) }
-@EXPORT = qw($Dwarn $DwarnN Dwarn DwarnS DwarnL DwarnN);
+@EXPORT = qw($Dwarn $DwarnN Dwarn DwarnS DwarnL DwarnN DwarnF);
sub Dwarn { return DwarnL(@_) if wantarray; DwarnS($_[0]) }
warn(($x?$x:'(anon)') . ' => ' . Data::Dumper::Concise::Dumper $_[0]); $_[0]
}
+sub DwarnF (&@) { my $c = shift; warn &Data::Dumper::Concise::DumperF($c, @_); @_ }
+
=head1 NAME
Data::Dumper::Concise::Sugar - return Dwarn @return_value
warn Dumper($return);
return $return;
+If you want to format the output of your data structures, try DwarnF
+
+ my ($a, $c) = DwarnF { "awesome: $_[0] not awesome: $_[1]" } $awesome, $cheesy;
+
+is equivalent to:
+
+ my @return = ($awesome, $cheesy);
+ warn DumperF { "awesome: $_[0] not awesome: $_[1]" } $awesome, $cheesy;
+ return @return;
+
=head1 DESCRIPTION
use Data::Dumper::Concise::Sugar;
B<Note>: this requires L<Devel::ArgNames> to be installed.
+=head2 DwarnF
+
+ sub DwarnF (&@) { my $c = shift; warn &Data::Dumper::Concise::DumperF($c, @_); @_ }
+
=head1 TIPS AND TRICKS
=head2 global usage