Skip to content

Instantly share code, notes, and snippets.

@dur-randir
Created August 3, 2015 20:58
Show Gist options
  • Save dur-randir/b80000cea918434999be to your computer and use it in GitHub Desktop.
Save dur-randir/b80000cea918434999be to your computer and use it in GitHub Desktop.
use mro 'c3';
package Foo {
our @ISA = qw/Bar/;
use Sub::Name qw/subname/;
*foo = \&Bar::foo;
subname bar => \&foo;
};
package Bar {
our @ISA = qw/Baz/;
sub foo { shift->next::method(@_) }
}
package Baz {
sub bar { warn 43 }
sub foo { warn 42 }
}
Foo->foo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment