X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=be64ec480eb0ebe8f8d32a8f680f9ee2e2922b31;hp=c290fff94aa683b2ceb0476e25dba8944c2db3bd;hb=7064f69b1dfb59d1f3bad647b2097d0320acce8a;hpb=d2995a765f120b78a134a6e8dfb14b0f7fde8644 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c290fff..be64ec4 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1560,7 +1560,7 @@ sub uri_for { my $fragment = ((scalar(@args) && ref($args[-1]) eq 'SCALAR') ? pop @args : undef ); unless(blessed $path) { - if ($path =~ s/#(.+)$//) { + if (defined($path) and $path =~ s/#(.+)$//) { if(defined($1) and $fragment) { carp "Abiguious fragment declaration: You cannot define a fragment in '$path' and as an argument '$fragment'"; }