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 -api_version => 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 -api_version => 0.92;
37 Class::MOP::in_global_destruction();
39 'Class::MOP::in_global_destruction is not deprecated with 0.92 compatibility';
47 ::throws_ok{ Foo2->meta->get_attribute_map }
48 qr/\Qget_attribute_map method has been deprecated/,
49 'get_attribute_map is deprecated';
55 use Class::MOP::Deprecated -api_version => 0.92;
56 use Scalar::Util qw( blessed );
62 Quux->meta->add_method( bar => sub {84} );
64 my $map = Quux->meta->get_method_map;
65 my @method_objects = grep { blessed($_) } values %{$map};
68 scalar @method_objects, 3,
69 'get_method_map still returns all values as method object'
72 [ sort keys %{$map} ],
74 'get_method_map returns expected methods'