[Catalyst] New Root Controller in Catalyst 5.66

T. H. Lin easy.lin at gmail.com
Mon May 1 16:49:04 CEST 2006


> after reading
> http://www.catalystframework.org/calendar/2005/8
>
> I did
> # in MyAPP.pm
> use Catalyst qw/-Debug
>                 ConfigLoader
>                 Static::Simple
>                 DefaultEnd
>                 ..../;
>
> # in MyApp/Controller/Root.pm
> sub end : Private {
>     my ( $self, $c ) = @_;
>
>     #code before view
>
>     $c->NEXT::end( $c );
>
>     #code after view
> }
>
> but
> .------------------------------------------------------------------+-----------.
> | Action                                                           | Time      |
> +------------------------------------------------------------------+-----------+
> | /some_action                                            | 0.000158s |
> | /end                                                             | 0.000481s |
> '------------------------------------------------------------------+-----------'
> it looks that DefaultEnd isn't triggered.

#if in in MyApp/Controller/Root.pm
sub end : Private {
    my ( $self, $c ) = @_;

    #code before view
    $c->log->debug(Dumper($c->session));

    Catalyst::Plugin::DefaultEnd->end($c);

    #code after view
}

[debug] $VAR1 = {
          '__address' => '127.0.0.1',
          '__created' => '1146490774',
          '__updated' => '1146490774'
        };
.------------------------------------------------------------------+-----------.
| Action                                                           | Time      |
+------------------------------------------------------------------+-----------+
| /some_action                                          | 0.000212s |
| /end                                                             | 0.077822s |
|  -> MyApp::View::TT->process                                  | 0.074136s |
'------------------------------------------------------------------+-----------'

But I think this is not a good way



More information about the Catalyst mailing list