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=56e0a2aeed68922c0ed1eae35277bcb9582c9eba;hb=7064f69b1dfb59d1f3bad647b2097d0320acce8a;hpb=a8020c62d2a52f96f14d288f5b81c6940be858b4 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 56e0a2a..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 and $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'"; }