4 use Test::More tests => 6;
9 $SIG{__WARN__} = \&croak;
17 Class::MOP::in_global_destruction();
18 } qr/\b deprecated \b/xmsi, 'complained';
26 use Class::MOP::Deprecated -compatible => 0.93;
29 Class::MOP::in_global_destruction();
30 } qr/\b deprecated \b/xmsi, 'complained';
38 use Class::MOP::Deprecated -compatible => 0.92;
41 Class::MOP::in_global_destruction();
52 Class::MOP::in_global_destruction();
53 } 'safe in an inner class';
59 use Class::MOP::Deprecated -compatible => 0.92;
60 use Scalar::Util qw( blessed );
66 Quux->meta->add_method( bar => sub {84} );
68 my $map = Quux->meta->get_method_map;
69 my @method_objects = grep { blessed($_) } values %{$map};
71 ::is( scalar @method_objects, 3,
72 'get_method_map still returns all values as method object' );
73 ::is_deeply( [ sort keys %{$map} ],
74 [ qw( bar foo meta ) ],
75 'get_method_map returns expected methods' );