From: Tomas Doran Date: Sat, 26 May 2012 10:14:27 +0000 (+0100) Subject: Fix warning in some chained dispatch cases X-Git-Tag: 5.90013~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a53e36d1c89298c1421aa5a9cc5ab9a8ebb972c9 Fix warning in some chained dispatch cases --- diff --git a/Changes b/Changes index c8f5e48..b8770fc 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ # This file documents the revision history for Perl extension Catalyst. Bug fixes: + - Fix warnings in some matching cases for Action methods with + Args(), when using Catalyst::DispatchType::Chained + - Fix request body parameters to not be undef if no parameters are supplied. diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 3b7b0c4..5f72fba 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -253,7 +253,7 @@ sub recurse_match { if (!$best_action || @parts < @{$best_action->{parts}} || - (!@parts && $args_attr eq 0)){ + (!@parts && defined($args_attr) && $args_attr eq "0")){ $best_action = { actions => [ $action ], captures=> [],