From: Florian Ragwitz Date: Tue, 7 Apr 2009 15:25:27 +0000 (+0200) Subject: Include stack traces in deprecation warnings. X-Git-Tag: 0.74~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b7cb9abd8b655110128a68e0a22d36038fd5686;p=gitmo%2FMoose.git Include stack traces in deprecation warnings. --- diff --git a/lib/Moose/Meta/Method/Destructor.pm b/lib/Moose/Meta/Method/Destructor.pm index 4111b30..5357b4c 100644 --- a/lib/Moose/Meta/Method/Destructor.pm +++ b/lib/Moose/Meta/Method/Destructor.pm @@ -61,8 +61,8 @@ sub is_needed { } sub initialize_body { - warn 'The initialize_body method has been made private.' - . " The public version is deprecated and will be removed in a future release.\n"; + Carp::cluck('The initialize_body method has been made private.' + . " The public version is deprecated and will be removed in a future release.\n"); shift->_initialize_body; } diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 1bf9ad6..d8b2199 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -418,7 +418,7 @@ sub get_method_list { } sub alias_method { - warn "The alias_method method is deprecated. Use add_method instead.\n"; + Carp::cluck("The alias_method method is deprecated. Use add_method instead.\n"); my $self = shift;