[Catalyst-commits] r9560 - Catalyst-Runtime/5.80/trunk/lib
timbunce at dev.catalyst.perl.org
timbunce at dev.catalyst.perl.org
Mon Mar 23 12:59:20 GMT 2009
Author: timbunce
Date: 2009-03-23 12:59:20 +0000 (Mon, 23 Mar 2009)
New Revision: 9560
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Add debug log in uri_for when uri_for_action returns undef.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-03-23 12:02:00 UTC (rev 9559)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-03-23 12:59:20 UTC (rev 9560)
@@ -1142,8 +1142,13 @@
my $captures = ( scalar @args && ref $args[0] eq 'ARRAY'
? shift(@args)
: [] );
- $path = $c->dispatcher->uri_for_action($path, $captures);
- return undef unless defined($path);
+ my $action = $path;
+ $path = $c->dispatcher->uri_for_action($action, $captures);
+ if (not defined $path) {
+ $c->log->debug(qq/Can't find uri_for action '$action' @$captures/)
+ if $c->debug;
+ return undef;
+ }
$path = '/' if $path eq '';
}
More information about the Catalyst-commits
mailing list