From: Sebastian Riedel Date: Tue, 8 Nov 2005 17:40:41 +0000 (+0000) Subject: Fixed multiple appclass bug X-Git-Tag: 5.7099_04~995 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f3b3f450e65aac37c01373a16579b4b902c8d5ba Fixed multiple appclass bug --- diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 490f549..4c6c139 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -117,10 +117,10 @@ sub forward { unless ($result) { - my $class = ref($command) || ref($c->component($command)); - my $method = shift || 'process'; + my $class = ref($command) || ref( $c->component($command) ); + my $method = shift || 'process'; - unless ( $class ) { + unless ($class) { my $error = qq/Couldn't forward to command "$command". Invalid action or component./; $c->error($error); @@ -258,7 +258,7 @@ sub get_containers { # should catch any failures - or short-circuit this if this *is* a # bug in the visitor and gets fixed. - if (my $extra = $path[ ( scalar @match ) - 1 ]) { + if ( my $extra = $path[ ( scalar @match ) - 1 ] ) { $visitor->setSearchPath($extra); $match[-1]->accept($visitor); push( @match, $visitor->getResult ) if defined $visitor->getResult; @@ -346,8 +346,6 @@ sub setup_actions { Catalyst::ActionContainer->new( { part => '/', actions => {} } ); $self->tree( Tree::Simple->new( $container, Tree::Simple->ROOT ) ); - $c->register_actions($c); - foreach my $comp ( values %{ $c->components } ) { $comp->register_actions($c) if $comp->can('register_actions'); }