From: Matt S Trout Date: Tue, 16 Nov 2010 21:43:54 +0000 (+0000) Subject: fixes for 5.10.0 X-Git-Tag: 0.009002~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=786e5ba05411220ef340bd586516b97345ca1365;p=gitmo%2FRole-Tiny.git fixes for 5.10.0 --- diff --git a/Changes b/Changes index 149112c..98e43f5 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - Change @ISA setting mechanism to deal with a big in 5.10.0's get_linear_isa + - Change 5.10 checks to >= to not try and load MRO::Compat on 5.10.0 - Make 'perl -Moo' DTRT 0.009001 Tue Nov 16 2010 diff --git a/lib/Moo.pm b/lib/Moo.pm index f01086e..7d93ea9 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -15,7 +15,8 @@ sub import { return if $MAKERS{$target}; # already exported into this package *{_getglob("${target}::extends")} = sub { _load_module($_) for @_; - *{_getglob("${target}::ISA")} = \@_; + # Can't do *{...} = \@_ or 5.10.0's mro.pm stops seeing @ISA + @{*{_getglob("${target}::ISA")}{ARRAY}} = @_; }; *{_getglob("${target}::with")} = sub { require Moo::Role; diff --git a/lib/Moo/_mro.pm b/lib/Moo/_mro.pm index 7c932a4..e599045 100644 --- a/lib/Moo/_mro.pm +++ b/lib/Moo/_mro.pm @@ -1,6 +1,6 @@ package Moo::_mro; -if ($] > 5.010) { +if ($] >= 5.010) { require mro; } else { require MRO::Compat; diff --git a/lib/Role/Tiny.pm b/lib/Role/Tiny.pm index 00bc654..1c7b051 100644 --- a/lib/Role/Tiny.pm +++ b/lib/Role/Tiny.pm @@ -92,7 +92,7 @@ sub create_class_with_roles { die "${role} is not a Role::Tiny" unless my $info = $INFO{$role}; } - if ($] > 5.010) { + if ($] >= 5.010) { require mro; } else { require MRO::Compat;