[Catalyst] Code question about Path dispatch type
Bill Moseley
moseley at hank.org
Mon Mar 24 13:24:12 GMT 2008
I noticed that register_path uses URI->canonical:
sub register_path {
my ( $self, $c, $path, $action ) = @_;
$path =~ s!^/!!;
$path = '/' unless length $path;
$path = URI->new($path)->canonical;
unshift( @{ $self->{paths}{$path} ||= [] }, $action);
return 1;
}
I'm confused, when would a Path attribute be a full URI?
http://dev.catalyst.perl.org/svnweb/Catalyst/view/Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Path.pm?rev=6897
BTW --
3178 matthewt $path = URI->new($path)->canonical;
If I try to get to that version in svn I get a redirect loop:
http://dev.catalyst.perl.org/svnweb/Catalyst/log/Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Path.pm
(click on the link "/trunk/Catalyst-Runtime:6895")
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list