3 use Data::Dumper::Concise::Sugar;
6 Data::Dumper::Concise::Sugar->export_to_level(1, @_);
11 Devel::Dwarn - return Dwarn @return_value
17 return Dwarn some_call(...)
21 use Data::Dumper::Concise;
24 my @return = some_call(...);
28 my $return = some_call(...);
33 but shorter. If you need to force scalar context on the value,
37 return DwarnS some_call(...)
41 use Data::Dumper::Concise;
43 my $return = some_call(...);
47 If you need to force list context on the value,
51 return DwarnL some_call(...)
55 use Data::Dumper::Concise;
57 my @return = some_call(...);
61 If you want to label your output, try DwarnN
69 use Data::Dumper::Concise;
71 my @return = some_call(...);
72 warn '$foo => ' . Dumper(@return);
75 =head1 TIPS AND TRICKS
79 Instead of always just doing:
87 perl -MDevel::Dwarn foo.pl
89 (and then in the perl code:)
93 That way, if you leave them in and run without the C<< use Devel::Dwarn >>
94 the program will fail to compile and you are less likely to check it in by
95 accident. Furthmore it allows that much less friction to add debug messages.
97 =head2 method chaining
99 One trick which is useful when doing method chaining is the following:
102 $foo->bar->baz->Devel::Dwarn::DwarnS->biff;
104 which is the same as:
107 (DwarnS $foo->bar->baz)->biff;
111 This module is really just a shortcut for L<Data::Dumper::Concise::Sugar>, check
112 it out for more complete documentation.