From: Matt S Trout Date: Sun, 29 Jan 2006 17:30:32 +0000 (+0000) Subject: - Fixes for rt.cpan #17322 and #17331 X-Git-Tag: 5.7099_04~722 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=0ba80bce27a56d366c8d44c254332dd83f9ba0f9 - Fixes for rt.cpan #17322 and #17331 --- diff --git a/Makefile.PL b/Makefile.PL index 6bb37d1..f37fe54 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,5 +1,7 @@ use inc::Module::Install; +perl_version '5.8.1'; + name 'Catalyst'; all_from 'lib/Catalyst.pm'; diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index 98ef303..227815f 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -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; }