Test uri_for with path = 0
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 574ee01..be64ec4 100644 (file)
@@ -180,7 +180,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.90098';
+our $VERSION = '5.90101';
 $VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases
 
 sub import {
@@ -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'";
         }