From: gfx Date: Sat, 9 Jan 2010 07:58:32 +0000 (+0900) Subject: Clean up deprecations X-Git-Tag: 0.46~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b0573c67ee047f04d4c97ffbc72bf108c303aa8;p=gitmo%2FMouse.git Clean up deprecations --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 05e25c3..b31b8c6 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -194,9 +194,9 @@ sub add_attribute { return $attr; } -sub compute_all_applicable_attributes { - Carp::cluck('compute_all_applicable_attributes() has been deprecated') - if Mouse::Util::_MOUSE_VERBOSE; +sub compute_all_applicable_attributes { # DEPRECATED + Carp::cluck('compute_all_applicable_attributes() has been deprecated. Use get_all_attributes() instead'); + return shift->get_all_attributes(@_) } @@ -218,11 +218,11 @@ sub clone_object { return $cloned; } -sub clone_instance { +sub clone_instance { # DEPRECATED my ($class, $instance, %params) = @_; - Carp::cluck('clone_instance has been deprecated. Use clone_object instead') - if Mouse::Util::_MOUSE_VERBOSE; + Carp::cluck('clone_instance() has been deprecated. Use clone_object() instead'); + return $class->clone_object($instance, %params); } diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index 34f9c61..6934eb1 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -16,6 +16,7 @@ if(Mouse::Util::MOUSE_XS){ sub _metaclass_cache { # DEPRECATED my($class, $name) = @_; + Carp::cluck('_metaclass_cache() has been deprecated. Use Mouse::Util::get_metaclass_by_name() instead'); return $METAS{$name}; } @@ -78,7 +79,7 @@ sub namespace; # add_attribute is an abstract method sub get_attribute_map { # DEPRECATED - Carp::cluck('get_attribute_map() has been deprecated'); + Carp::cluck('get_attribute_map() has been deprecated. Use get_attribute_list() and get_attribute() instead'); return $_[0]->{attributes}; }