X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=05536228522fa9039e9c6ac703f69ebdcc200c23;hp=cf21915f28da84a7fe50ef3151abd9cc9dbf5f4f;hb=24b3262af814a1014fd1ed9ea0eb0dedb90f67b4;hpb=587b0f5882d4f5e128ae082758da37b065a3efde diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index cf21915..0553622 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -43,7 +43,7 @@ our $DETACH = "catalyst_detach\n"; require Module::Pluggable::Fast; # Helper script generation -our $CATALYST_SCRIPT_GEN = 18; +our $CATALYST_SCRIPT_GEN = 24; __PACKAGE__->mk_classdata($_) for qw/components arguments dispatcher engine log dispatcher_class @@ -54,7 +54,7 @@ __PACKAGE__->engine_class('Catalyst::Engine::CGI'); __PACKAGE__->request_class('Catalyst::Request'); __PACKAGE__->response_class('Catalyst::Response'); -our $VERSION = '5.57'; +our $VERSION = '5.62'; sub import { my ( $class, @arguments ) = @_; @@ -674,8 +674,11 @@ sub uri_for { # join args with '/', or a blank string my $args = ( scalar @args ? '/' . join( '/', @args ) : '' ); - return URI->new_abs( URI->new_abs( "$path$args", "$basepath$namespace" ), - $base )->canonical; + $args =~ s/^\/// unless $path; + my $res = + URI->new_abs( URI->new_abs( "$path$args", "$basepath$namespace" ), $base ) + ->canonical; + $res; } =head2 $c->welcome_message @@ -1842,6 +1845,8 @@ Wiki: =head1 SEE ALSO +=head2 L - All you need to start with Catalyst + =head2 L - The Catalyst Manual =head2 L, L - Base classes for components