X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=46f41f8fb629637486b2892a731fcd2f770dbd15;hb=1d00b2ffb8806bd0a8190ee8580a85895e48f8e4;hp=12040b23654b7e8c798e8125bee52e9311b3b9ec;hpb=0ca510f0aa1cabe138d81897d38111d7b772449c;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 12040b2..46f41f8 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -273,6 +273,7 @@ Documented in L sub detach { my ( $self, $c, $command, @args ) = @_; $self->_do_forward(detach => $c, $command, @args ) if $command; + $c->state(0); # Needed in order to skip any auto functions Catalyst::Exception::Detach->throw; } @@ -614,6 +615,7 @@ sub setup_actions { @{ $self->_registered_dispatch_types }{@classes} = (1) x @classes; foreach my $comp ( values %{ $c->components } ) { + $comp = $comp->() if ref($comp) eq 'CODE'; $comp->register_actions($c) if $comp->can('register_actions'); }