Checks that Moose::object and derived classes don't pollute the method
namespace with exports (regardless of whether or not there are meta
method objects for these)
use strict;
use warnings;
-use Test::More tests => 22;
+use Test::More tests => 30;
use Test::Exception;
ok(!Foo->meta->has_method($function), '... the meta does not treat "' . $function . '" as a method');
}
+foreach my $import (qw(
+ blessed
+ try
+ catch
+ in_global_destruction
+)) {
+ ok(!Moose::Object->can($import), "no namespace pollution in Moose::Object ($import)" );
+
+ local $TODO = $import eq 'blessed' ? "no automatic namespace cleaning yet" : undef;
+ ok(!Foo->can($import), "no namespace pollution in Moose::Object ($import)" );
+}