From: Tokuhiro Matsuno Date: Sat, 6 Dec 2008 07:46:19 +0000 (+0000) Subject: bug fixed when perl 5.8 X-Git-Tag: 0.19~136^2~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bcd39bf45ef69561e5ee81b50f4d5760cf19b554;p=gitmo%2FMouse.git bug fixed when perl 5.8 --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index cf807da..7dc8187 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -16,12 +16,12 @@ our %EXPORT_TAGS = ( BEGIN { my $impl; - if (\&mro::get_linear_isa) { + if ($] >= 5.009_005) { $impl = \&mro::get_linear_isa; } else { my $loaded = do { local $SIG{__DIE__} = 'DEFAULT'; - eval "use MRO::Compat (); 1"; + eval "require MRO::Compat; 1"; }; if ($loaded) { $impl = \&mro::get_linear_isa; @@ -49,6 +49,7 @@ BEGIN { $impl = $code; } } + no strict 'refs'; *{ __PACKAGE__ . '::get_linear_isa'} = $impl; }