X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=bd6c65b4da63045357c4ee21006fb7fb0b855d57;hb=3e9adc7cc265e00dcfe0a48b030d605659d4eb46;hp=860822e73d62ddef1512cb8d40ec20b00cc484e9;hpb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 860822e..bd6c65b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -205,7 +205,7 @@ sub composed_stats_class { __PACKAGE__->_encode_check(Encode::FB_CROAK | Encode::LEAVE_SRC); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90117'; +our $VERSION = '5.90119'; $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases sub import { @@ -1601,11 +1601,11 @@ sub uri_for { $path .= '/'; } - my $fragment = ((scalar(@args) && ref($args[-1]) eq 'SCALAR') ? pop @args : undef ); + my $fragment = ((scalar(@args) && ref($args[-1]) eq 'SCALAR') ? ${pop @args} : undef ); unless(blessed $path) { if (defined($path) and $path =~ s/#(.+)$//) { - if(defined($1) and $fragment) { + if(defined($1) and defined $fragment) { carp "Abiguious fragment declaration: You cannot define a fragment in '$path' and as an argument '$fragment'"; } if(defined($1)) { @@ -1725,7 +1725,7 @@ sub uri_for { if(defined $fragment) { if(blessed $path) { - $fragment = encode_utf8(${$fragment}); + $fragment = encode_utf8($fragment); $fragment =~ s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go; $fragment =~ s/ /+/g; }