Skip to content

Instantly share code, notes, and snippets.

@lopnor
Created June 22, 2009 09:48
Show Gist options
  • Save lopnor/133899 to your computer and use it in GitHub Desktop.
Save lopnor/133899 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
{
package Foo;
use Moose::Role;
sub foo {
warn 'here';
}
}
{
package Bar;
use Moose;
BEGIN {
with 'Foo';
}
around foo => sub {
my ($next) = @_;
warn 'hoge';
$next->();
};
}
{
package Baz;
use Moose;
BEGIN {
extends 'Bar';
}
around foo => sub {
my ($next) = @_;
warn 'fuga';
$next->();
};
}
Baz->new->foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment