Fix for Path('0') handling (RT #29334)
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Path.pm
index d832dce..d983d8a 100644 (file)
@@ -47,7 +47,7 @@ first action that matches, if any; if not, returns 0.
 sub match {
     my ( $self, $c, $path ) = @_;
 
-    $path ||= '/';
+    $path = '/' if !defined $path;
 
     foreach my $action ( @{ $self->{paths}->{$path} || [] } ) {
         next unless $action->match($c);