From: Shawn M Moore Date: Sat, 2 May 2009 02:20:22 +0000 (-0400) Subject: Deprecate, don't remove, Class::MOP::{subname,in_global_destruction} X-Git-Tag: 0.84~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5ed91ade9b72edc65ef71ae79ca6496296dc9fe;p=gitmo%2FClass-MOP.git Deprecate, don't remove, Class::MOP::{subname,in_global_destruction} --- diff --git a/Changes b/Changes index d1f2418..73828c5 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,8 @@ Revision history for Perl extension Class-MOP. * Class::MOP - - Remove in_global_destruction and subname re-exporting (perigrin) + - Deprecate in_global_destruction and subname re-exporting + (perigrin & Sartak) * Class::MOP::Class - Explicitly use Devel::GlobalDestruction and Sub::Name (perigrin) * Class::MOP::Package diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index fdb397f..791b95b 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -153,6 +153,18 @@ sub _is_valid_class_name { return 0; } +sub subname { + require Sub::Name; + Carp::carp("Class::MOP::subname is deprecated. Please use Sub::Name directly."); + goto \&Sub::Name::subname; +} + +sub in_global_destruction { + require Devel::GlobalDestruction; + Carp::carp("Class::MOP::in_global_destruction is deprecated. Please use Devel::GlobalDestruction directly."); + goto \&Devel::GlobalDestruction::in_global_destruction; +} + ## ---------------------------------------------------------------------------- ## Setting up our environment ... ## ----------------------------------------------------------------------------