X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=32ccd67d6e191e2ee679a2965126d1ae444ad4b2;hb=386777dc6439f150392cbca5da094803296d3640;hp=c0daccd14e8112f722d0248642311122fe3f1070;hpb=2d752b2a8829f424075d4619e9d4edd852adbf46;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index c0daccd..32ccd67 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -135,9 +135,11 @@ sub forward { unless ( @{$results} ) { my $class = $command || ''; + my $path = $class . '.pm'; + $path =~ s/::/\//g; - if ( $class =~ /[^\w\:]/ ) { - my $error = qq/Couldn't forward to "$class"/; + unless ( $INC{ $path } ) { + my $error = qq/Couldn't forward to "$class". Invalid or not loaded./; $c->error($error); $c->log->debug($error) if $c->debug; return 0; @@ -151,7 +153,7 @@ sub forward { } else { - my $error = qq/Couldn't forward to "$class"/; + my $error = qq/Couldn't forward to "$class". Does not implement "$method"/; $c->error($error); $c->log->debug($error) if $c->debug;