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 If you want to output a reference returned by a method easily, try $Dwarn
77 $foo->bar->{baz}->$Dwarn
81 my $return = $foo->bar->{baz};
85 =head1 TIPS AND TRICKS
89 Instead of always just doing:
97 perl -MDevel::Dwarn foo.pl
99 (and then in the perl code:)
103 That way, if you leave them in and run without the C<< use Devel::Dwarn >>
104 the program will fail to compile and you are less likely to check it in by
105 accident. Furthmore it allows that much less friction to add debug messages.
107 =head2 method chaining
109 One trick which is useful when doing method chaining is the following:
112 $foo->bar->baz->Devel::Dwarn::DwarnS->biff;
114 which is the same as:
117 (DwarnS $foo->bar->baz)->biff;
121 This module is really just a shortcut for L<Data::Dumper::Concise::Sugar>, check
122 it out for more complete documentation.