sub _getglob { \*{$_[0]} }
sub _getstash { \%{"$_[0]::"} }
-use constant lt_5_8_3 => ( $] < 5.008003 ) ? 1 : 0;
+use constant lt_5_8_3 => ( $] < 5.008003 or $ENV{MOO_TEST_PRE_583} ) ? 1 : 0;
use constant can_haz_subname => eval { require Sub::Name };
use strictures 1;
use strictures 1;
-use Moo::_Utils;
BEGIN {
- no warnings 'redefine';
- *Moo::_Utils::lt_5_8_3 = sub () { 1 };
+ $ENV{MOO_TEST_PRE_583} = 1;
}
(my $real_test = __FILE__) =~ s/-pre-5_8_3//;
use strictures 1;
use Test::More;
+use Moo::_Utils;
+
+ok(Moo::_Utils::lt_5_8_3, "pretending to be pre-5.8.3")
+ if $ENV{MOO_TEST_PRE_583};
{
package Foo;