X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=33d497f59b0519fcb26d6c39731fb60e1adaee6f;hp=32ccd67d6e191e2ee679a2965126d1ae444ad4b2;hb=3245f607a5d5494a4e7b4e8b06a63891b87893e5;hpb=75aeff23c055c680a7293a9642f556fc253274db diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 32ccd67..33d497f 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -144,6 +144,13 @@ sub forward { $c->log->debug($error) if $c->debug; return 0; } + + unless ( UNIVERSAL::isa( $class, 'Catalyst::Base' ) ) { + my $error = qq/Can't forward to "$class". Class is not a Catalyst component./; + $c->error($error); + $c->log->debug($error) if $c->debug; + return 0; + } my $method = shift || 'process';