- Fixes for rt.cpan #17322 and #17331
Matt S Trout [Sun, 29 Jan 2006 17:30:32 +0000 (17:30 +0000)]
Makefile.PL
lib/Catalyst/DispatchType/Path.pm

index 6bb37d1..f37fe54 100644 (file)
@@ -1,5 +1,7 @@
 use inc::Module::Install;
 
+perl_version '5.8.1';
+
 name 'Catalyst';
 all_from 'lib/Catalyst.pm';
 
index 98ef303..227815f 100644 (file)
@@ -64,7 +64,7 @@ sub register {
     foreach my $r ( @{ $attrs->{Path} || [] } ) {
         unless ($r) {
             $r = $action->namespace;
-            $r = '/' unless $r;
+            $r = '/' unless length $r;
         }
         elsif ( $r !~ m!^/! ) {    # It's a relative path
             $r = $action->namespace . "/$r";
@@ -94,7 +94,7 @@ sub register {
 sub register_path {
     my ( $self, $c, $path, $action ) = @_;
     $path =~ s!^/!!;
-    $path = '/' unless $path;
+    $path = '/' unless length $path;
     $self->{paths}{$path} = $action;
 }