Method modifiers
before & after
before 'foo' => sub { warn "foo being called with ", @_ };
after 'foo' => sub { warn "foo has been called" };
- before and after are for side-effects, and do not affect @_ or the return value
around
around 'bar' => sub {
my $next = shift;
my ($self, @args) = @_;
# ... do something here
...