Created
August 3, 2015 20:58
-
-
Save dur-randir/b80000cea918434999be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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