use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Carp;
{
package Foo;
- ::throws_ok{
+ ::like( ::exception {
Class::MOP::in_global_destruction();
- } qr/\b deprecated \b/xmsi,
- 'Class::MOP::in_global_destruction is deprecated';
+ }, qr/\b deprecated \b/xmsi, 'Class::MOP::in_global_destruction is deprecated' );
}
{
use Class::MOP::Deprecated -api_version => 0.93;
- ::throws_ok{
+ ::like( ::exception {
Class::MOP::in_global_destruction();
- } qr/\b deprecated \b/xmsi,
- 'Class::MOP::in_global_destruction is deprecated with 0.93 compatibility';
+ }, qr/\b deprecated \b/xmsi, 'Class::MOP::in_global_destruction is deprecated with 0.93 compatibility' );
}
{
use Class::MOP::Deprecated -api_version => 0.92;
- ::lives_ok{
+ ::is( ::exception {
Class::MOP::in_global_destruction();
- }
- 'Class::MOP::in_global_destruction is not deprecated with 0.92 compatibility';
+ }, undef, 'Class::MOP::in_global_destruction is not deprecated with 0.92 compatibility' );
}
{
use metaclass;
- ::throws_ok{ Foo2->meta->get_attribute_map }
- qr/\Qget_attribute_map method has been deprecated/,
- 'get_attribute_map is deprecated';
+ ::like( ::exception { Foo2->meta->get_attribute_map }, qr/\Qget_attribute_map method has been deprecated/, 'get_attribute_map is deprecated' );
}
{