From: Sebastian Riedel Date: Sat, 22 Apr 2006 06:20:29 +0000 (+0000) Subject: Fixed a small bug X-Git-Tag: 5.7099_04~621 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=28928de92c8bfea34d7e995bc92f1bf5632242d6 Fixed a small bug --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index e330047..d038d9e 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -287,7 +287,7 @@ sub get_action { my ( $self, $name, $namespace ) = @_; return unless $name; - $namespace = join("/", grep { length } split '/', $namespace || "" ); + $namespace = join( "/", grep { length } split '/', $namespace || "" ); return $self->action_hash->{"$namespace/$name"}; } @@ -300,6 +300,7 @@ returns the named action by it's full path. sub get_action_by_path { my ( $self, $path ) = @_; + $path = "/$path" unless $path =~ /\//; $self->action_hash->{$path}; } @@ -311,7 +312,7 @@ sub get_actions { my ( $self, $c, $action, $namespace ) = @_; return [] unless $action; - $namespace = join("/", grep { length } split '/', $namespace || "" ); + $namespace = join( "/", grep { length } split '/', $namespace || "" ); my @match = $self->get_containers($namespace);