From: Arthur Axel 'fREW' Schmidt Date: Sun, 7 Feb 2010 11:50:24 +0000 (-0600) Subject: doc for chaining feature X-Git-Tag: v2.000~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=012236322bb8a135a0e1712b380ca9c3f55d2524;p=p5sagit%2FData-Dumper-Concise.git doc for chaining feature --- diff --git a/lib/Data/Dumper/Concise/Sugar.pm b/lib/Data/Dumper/Concise/Sugar.pm index ba85d97..addd8e2 100644 --- a/lib/Data/Dumper/Concise/Sugar.pm +++ b/lib/Data/Dumper/Concise/Sugar.pm @@ -45,6 +45,17 @@ is equivalent to: warn Dumper($return); return $return; +Another trick that is extremely useful when doing method chaining is the +following: + + my $foo = Bar->new; + $foo->bar->baz->Data::Dumper::Concise::Sugar::DwarnS->biff; + +which is the same as: + + my $foo = Bar->new; + (DwarnS $foo->bar->baz)->biff; + =head1 DESCRIPTION use Data::Dumper::Concise::Sugar; diff --git a/lib/Devel/Dwarn.pm b/lib/Devel/Dwarn.pm index 6df4f7a..c522a11 100644 --- a/lib/Devel/Dwarn.pm +++ b/lib/Devel/Dwarn.pm @@ -38,6 +38,17 @@ is equivalent to: warn Dumper($return); return $return; +Another trick that is extremely useful when doing method chaining is the +following: + + my $foo = Bar->new; + $foo->bar->baz->Devel::Dwarn::DwarnS->biff; + +which is the same as: + + my $foo = Bar->new; + (DwarnS $foo->bar->baz)->biff; + =head1 SEE ALSO This module is really just a shortcut for L, check