From: Matt S Trout Date: Tue, 8 Nov 2005 17:08:31 +0000 (+0000) Subject: - Fixed a dispatcher bug, thanks nothingmuch X-Git-Tag: 5.7099_04~996 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=540966c1cceb83d76a1648209ec53c1ef7aa3234 - Fixed a dispatcher bug, thanks nothingmuch --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 8c87b75..490f549 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -258,11 +258,11 @@ sub get_containers { # should catch any failures - or short-circuit this if this *is* a # bug in the visitor and gets fixed. - my $extra = $path[ ( scalar @match ) - 1 ]; - last unless $extra; - $visitor->setSearchPath($extra); - $match[-1]->accept($visitor); - push( @match, $visitor->getResult ) if defined $visitor->getResult; + if (my $extra = $path[ ( scalar @match ) - 1 ]) { + $visitor->setSearchPath($extra); + $match[-1]->accept($visitor); + push( @match, $visitor->getResult ) if defined $visitor->getResult; + } } return map { $_->getNodeValue } @match;