Subject: | t/050_metaclasses/011_init_meta.t emits warnings. |
Patch attached to test for the warning. Does this test file go away all together now it's
deprecated?
Subject: | patch.txt |
diff --git a/t/050_metaclasses/011_init_meta.t b/t/050_metaclasses/011_init_meta.t
index 506c3c1..fa6fcc0 100644
--- a/t/050_metaclasses/011_init_meta.t
+++ b/t/050_metaclasses/011_init_meta.t
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl
use strict;
use warnings;
@@ -10,7 +10,13 @@ use Moose ();
{ package Foo; }
-my $meta = Moose::init_meta('Foo');
+my $meta;
+{
+ my $message = '';
+ local $SIG{__WARN__} = sub {$message .= shift};
+ $meta = Moose::init_meta('Foo');
+ like($message, qr/Calling Moose::init_meta as a function is deprecated at/, "Deprecated message calling init_meta");
+}
ok( Foo->isa('Moose::Object'), '... Foo isa Moose::Object');
isa_ok( $meta, 'Moose::Meta::Class' );