Created
July 14, 2016 19:33
-
-
Save haarg/1d3f2059f3e3807f91a18e962c44f595 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 strict; | |
use warnings; | |
use mro (); | |
BEGIN { | |
package Super; | |
use mro 'c3'; | |
sub foo { | |
$_[0]->maybe::next::method; | |
} | |
} | |
BEGIN { | |
package Parent1; | |
BEGIN { our @ISA = qw(Super) } | |
use mro 'c3'; | |
} | |
BEGIN { | |
package Parent2; | |
BEGIN { our @ISA = qw(Super) } | |
use mro 'c3'; | |
} | |
BEGIN { | |
package Mine; | |
BEGIN { our @ISA = qw(Parent1 Parent2) } | |
use mro 'c3'; | |
} | |
my $class = "Mine" . substr($ENV{PATH},0,0); | |
mro::get_linear_isa($class); | |
Mine->foo; # will recurse infinitely | |
$class->foo; # will die due to taint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment