From: Matt S Trout Date: Sun, 6 Nov 2005 19:47:31 +0000 (+0000) Subject: - Fixed it so tests run again X-Git-Tag: 5.7099_04~1005 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=2c68dfce1dc4c37623e2a8184efe856e38dedc1a - Fixed it so tests run again --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index e9d999d..745f84f 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -114,15 +114,12 @@ sub forward { } } } - else { - $result = $command; - } unless ($result) { my $comp; - unless ( $comp = $c->component($command) ) { + unless ( $comp = (ref $command ? $command : $c->component($command)) ) { my $error = qq/Couldn't forward to command "$command". Invalid action or component./; $c->error($error);