[Catalyst-commits] r10013 - in Catalyst-Runtime/5.80/trunk: .
lib/Catalyst
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Tue May 5 15:36:26 GMT 2009
Author: t0m
Date: 2009-05-05 15:36:26 +0000 (Tue, 05 May 2009)
New Revision: 10013
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
Log:
Fix deprecation error message in dispatcher to be useful.
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2009-05-05 15:36:07 UTC (rev 10012)
+++ Catalyst-Runtime/5.80/trunk/Changes 2009-05-05 15:36:26 UTC (rev 10013)
@@ -1,5 +1,7 @@
# This file documents the revision history for Perl extension Catalyst.
+ - Fix deprecation message for Catalyst::Dispatcher to refer
+ to the class actually calling the deprecated method. RT#45741 (t0m)
- Clarify limitations of $request->base and $request->secure.
(Phil Mitchell)
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm 2009-05-05 15:36:07 UTC (rev 10012)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm 2009-05-05 15:36:26 UTC (rev 10013)
@@ -708,9 +708,12 @@
# I haven't provided a way to disable them, patches welcome.
$meta->add_before_method_modifier($public_method_name, sub {
my $class = blessed(shift);
+ my $class = caller(2);
+ chomp($class);
$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\n");
+ warn("Class $class is calling the deprecated method\n"
+ . " Catalyst::Dispatcher::$public_method_name,\n"
+ . " this will be removed in Catalyst 5.9X\n");
};
});
}
More information about the Catalyst-commits
mailing list