From: Marcus Ramberg Date: Fri, 20 Jul 2007 12:30:44 +0000 (+0000) Subject: add warning in uri_for for undefined args X-Git-Tag: 5.7099_04~178 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=cbb931057eb985308705c7b29aca87600b99ecd4 add warning in uri_for for undefined args --- diff --git a/Changes b/Changes index 7745f12..fd6b5be 100644 --- a/Changes +++ b/Changes @@ -1,13 +1,12 @@ This file documents the revision history for Perl extension Catalyst. -X.XXXX +5.7008 + - add undef warning for uri_for - Fix bug where a nested component would be setup twice - Make ensure_class_loaded behave better with malformed class name - - Make _register_plugin use ensure_class_loaded + - Make _register_plugin use ensure_class_loaded - Remove 'Argument "??" isn't numeric in sprintf' warning (Emanuele Zeppieri) - -5.7008 - Fixed a bug where Content-Length could be set to 0 if a filehandle object in $c->response->body did not report a size. - Fixed issue where development server running in fork mode did not diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e20a2cf..284f114 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -931,6 +931,7 @@ sub uri_for { my $params = ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} ); + carp "uri_for called with undef argument" if grep { ! defined $_ } @args; s/([^$URI::uric])/$URI::Escape::escapes{$1}/go for @args; unshift(@args, $path);