From: Sebastian Riedel Date: Mon, 28 Mar 2005 18:02:14 +0000 (+0000) Subject: fixed the inheritance bug X-Git-Tag: 5.7099_04~1671 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=970cc51d658caacc56714f712fa567398ee48218 fixed the inheritance bug --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 70afecb..1dd09c0 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -194,7 +194,7 @@ sub import { die qq/Couldn't load engine "$engine", "$@"/ if $@; { no strict 'refs'; - unshift @{"$caller\::ISA"}, $engine; + push @{"$caller\::ISA"}, $engine; } $caller->engine($engine); $caller->log->debug(qq/Loaded engine "$engine"/) if $caller->debug; diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 4ce7e3b..ec4842b 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -287,7 +287,7 @@ sub forward { } } for my $result ( @{$results} ) { - $c->state( $c->process( @{ $result->[0] } ) ); + $c->state( $c->execute( @{ $result->[0] } ) ); } return $c->state; } @@ -367,14 +367,14 @@ sub handler ($$) { $namespace ||= '/'; if ( @{$results} ) { for my $begin ( @{ $c->get_action( 'begin', $namespace ) } ) { - $c->state( $c->process( @{ $begin->[0] } ) ); + $c->state( $c->execute( @{ $begin->[0] } ) ); } for my $result ( @{ $c->get_action( $action, $default ) } ) { - $c->state( $c->process( @{ $result->[0] } ) ); + $c->state( $c->execute( @{ $result->[0] } ) ); last unless $default; } for my $end ( @{ $c->get_action( 'end', $namespace ) } ) { - $c->state( $c->process( @{ $end->[0] } ) ); + $c->state( $c->execute( @{ $end->[0] } ) ); } } else { @@ -564,14 +564,14 @@ Prepare uploads. sub prepare_uploads { } -=item $c->process($class, $coderef) +=item $c->execute($class, $coderef) -Process a coderef in given class and catch exceptions. +Execute a coderef in given class and catch exceptions. Errors are available via $c->error. =cut -sub process { +sub execute { my ( $c, $class, $code ) = @_; $class = $c->comp($class) || $class; $c->state(0);