[Catalyst] returning false in auto action does not break chain

Sebastian Riedel sri at oook.de
Sat May 14 17:33:53 CEST 2005


Am 14.05.2005 um 16:03 schrieb Edmund von der Burg:

> Hello,
>
> I am trying to break out of the processing chain by returning 0 in the
> 'auto' action. However the chain is still processed. I have simplified
> the auto to:
>
> # In Scrpbk::C::Scrap
> sub auto : Private {
>     my ( $self, $c ) = @_;
>     warn 'Return 0';
>     return 0;
> }
>
> When I request a page I get in the logs:
>
> Return 0 at /usr/local/sandbox/Scrpbk/script/../lib/Scrpbk/C/ 
> Scrap.pm line 10.
> .=----------------------------------------------------------------- 
> +----------=.
> | Action                                                            
> | Time      |
> |=----------------------------------------------------------------- 
> +----------=|
> | /begin                                                            
> | 0.000039s |
> | /scrap/auto                                                       
> | 0.000280s |
> | /scrap/edit                                                       
> | 0.063021s |
> | -> Scrpbk::V::TT->process                                         
> | 0.202744s |
> | /end                                                              
> | 0.203326s |
> '=----------------------------------------------------------------- 
> +----------='
>
> This conficts with the documented behaviour in  
> 'Catalyst::Manual::Intro':

It's a bug and fixed in trunk already.

--
sebastian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050514/3c83b2e4/attachment.html


More information about the Catalyst mailing list