X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FPath.pm;h=cffe66b4f591d85db281335aabce6ebdb268404a;hp=c1f1255426c66f288b8676c0c4769122769a4d0f;hb=081def36ee509794aa7b30768c699b16636cee33;hpb=97d6d2bd519e8905980c19b641737e93d6e006f2 diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index c1f1255..cffe66b 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -81,10 +81,17 @@ sub register { # Register sub name as a relative path } - foreach my $r (@register) { - $r =~ s!^/!!; - $self->{paths}{$r} = $action; - } + $self->register_path($c, $_, $action) for @register; +} + +=item $self->register_path($c, $path, $action) + +=cut + +sub register_path { + my ($self, $c, $path, $action) = @_; + $path =~ s!^/!!; + $self->{paths}{$path} = $action; } =back