4 use Test::More tests => 6;
9 $SIG{__WARN__} = \&croak;
15 Class::MOP::in_global_destruction();
16 } qr/\b deprecated \b/xmsi,
17 'Class::MOP::in_global_destruction is deprecated';
23 use Class::MOP::Deprecated -compatible => 0.93;
26 Class::MOP::in_global_destruction();
27 } qr/\b deprecated \b/xmsi,
28 'Class::MOP::in_global_destruction is deprecated with 0.93 compatibility';
34 use Class::MOP::Deprecated -compatible => 0.92;
37 Class::MOP::in_global_destruction();
39 'Class::MOP::in_global_destruction is not deprecated with 0.92 compatibility';
46 Class::MOP::in_global_destruction();
47 } 'safe in an inner class';
53 use Class::MOP::Deprecated -compatible => 0.92;
54 use Scalar::Util qw( blessed );
60 Quux->meta->add_method( bar => sub {84} );
62 my $map = Quux->meta->get_method_map;
63 my @method_objects = grep { blessed($_) } values %{$map};
66 scalar @method_objects, 3,
67 'get_method_map still returns all values as method object'
70 [ sort keys %{$map} ],
72 'get_method_map returns expected methods'