From: Dave Rolsky Date: Wed, 14 Jul 2010 16:40:09 +0000 (-0500) Subject: Deprecation warning for Moose::init_meta X-Git-Tag: 1.09~39 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d69a348ea5543e17acdbcb8fc1a376b94563054d;p=gitmo%2FMoose.git Deprecation warning for Moose::init_meta --- diff --git a/lib/Moose.pm b/lib/Moose.pm index edfcfec..87a4398 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -133,6 +133,11 @@ sub init_meta { # This used to be called as a function. This hack preserves # backwards compatibility. if ( $_[0] ne __PACKAGE__ ) { + Moose::Deprecated::deprecated( + feature => 'Moose::init_meta', + message => 'Calling Moose::init_meta as a function is deprecated', + ); + return __PACKAGE__->init_meta( for_class => $_[0], base_class => $_[1], diff --git a/lib/Moose/Deprecated.pm b/lib/Moose/Deprecated.pm index 71ac437..c7b09af 100644 --- a/lib/Moose/Deprecated.pm +++ b/lib/Moose/Deprecated.pm @@ -13,6 +13,7 @@ use Package::DeprecationManager -deprecations => { 'Role type' => '0.84', 'subtype without sugar' => '0.72', 'type without sugar' => '0.72', + 'Moose::init_meta' => '0.56', }, -ignore => [qw( Moose Moose::Exporter Moose::Util::MetaRole )], ;