};
# ^^^^^ CODE TAKEN FROM MRO::COMPAT ^^^^^
- eval{ require Class::C3 };
-
# MRO::Compat::__get_linear_isa has no prototype, so
# we define a prototyped version for compatibility with core's
# See also MRO::Compat::__get_linear_isa.
our %MRO;
$type = exists $MRO{$classname} ? 'c3' : 'dfs';
}
- return $type eq 'c3'
- ? [calculateMRO($classname)]
- : $_get_linear_isa_dfs->($classname);\r
+ if($type eq 'c3'){
+ require Class::C3;
+ return [ calculateMRO($classname) ];
+ }
+ elsif($type eq 'dfs'){
+ return $_get_linear_isa_dfs->($classname);
+ }
+ else{
+ Carp::croak("Unknown mro type '$type'");
+ }
};
}