Møøse

Method modifiers

before & after

before 'foo' => sub { warn "foo being called with ", @_ };
 after 'foo' => sub { warn "foo has been called" };

around

around 'bar' => sub {
    my $next = shift;
    my ($self, @args) = @_;
    # ... do something here
    $next->($self, @args); # call the next method
};
Copyright © 2006 Stevan Little