- Fixed warning
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 89de3ca..18ddc4b 100644 (file)
@@ -137,9 +137,9 @@ sub forward {
     my $command_copy = $command;
 
     unless ( $command_copy =~ s/^\/// ) {
-        $command_copy =
-          Catalyst::Utils::class2prefix( $caller, $c->config->{case_sensitive} )
-          . "/${command}";
+        my $namespace =
+          Catalyst::Utils::class2prefix( $caller, $c->config->{case_sensitive} ) || '';
+        $command_copy = "${namespace}/${command}";
     }
 
     unless ( $command_copy =~ /\// ) {