X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=d86c6f4b041cf517f47df24398c650b09dd92a62;hb=b29d02febe1f0a3b0c7fca188e99373831fa19a8;hp=d3226bd1a38130f704ff374d7f052c0edb917a5e;hpb=79fb8f95180a06c51de7f0fde227927b5d864a7f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index d3226bd..d86c6f4 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'"; }