Skip to content

Commit

Permalink
another Mojo::Base example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 26, 2014
1 parent 18fe6ff commit 94868cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Mojo/Base.pm
Expand Up @@ -219,6 +219,9 @@ and is also available as C<$_>.
# Longer version
$object = $object->tap(sub { $_->$method(@args) });
# Inject side effects into a method chain
my $object = SubClass->new(foo => 'A')->tap(sub { say $_->foo })->foo('B');
=head1 DEBUGGING
You can set the C<MOJO_BASE_DEBUG> environment variable to get some advanced
Expand Down

1 comment on commit 94868cc

@kraih
Copy link
Member Author

@kraih kraih commented on 94868cc Nov 26, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefan-kt I've chosen foo specifically to highlight that those method names are completely arbitrary.

Please sign in to comment.