X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=214d0313c4f5803f568c176b5817dff8049cee1a;hb=85f0a66f2b5de7a028ed0e4960435784baff4a37;hp=f92b92b97c63729966567ec0fbdd512fd0f6d4ab;hpb=792d99b4a8fa373e065064b05a5bee63f15e9790;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index f92b92b..214d031 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -707,10 +707,12 @@ foreach my $public_method_name (qw/ my %package_hash; # Only warn once per method, per package. These are infrequent enough that # I haven't provided a way to disable them, patches welcome. $meta->add_before_method_modifier($public_method_name, sub { - my $class = blessed(shift); - $package_hash{$class}++ || do { - warn("Class $class is calling the deprecated method Catalyst::Dispatcher::$public_method_name,\n" - . "this will be removed in Catalyst 5.9X"); + my $class = caller(2); + chomp($class); + $package_hash{$class}++ || do { + warn("Class $class is calling the deprecated method\n" + . " Catalyst::Dispatcher::$public_method_name,\n" + . " this will be removed in Catalyst 5.9X\n"); }; }); }