[Catalyst] Minor Problem With Tutorial

Jonathan Rockway jon at jrock.us
Mon Aug 14 21:23:55 CEST 2006

Just to keep this clear, END and end are two different things.

END is a perl operator.  Anything inside an END block will be executed
when the program is shutting down -- in Catalyst's case, hopefully never.

end (lowercase) in Catalyst controllers gets called after all controller
methods have returned.  They're called from most-specific to
most-general, so if you're in MyApp::Controller::Foo,
MyApp::Controller::Foo::end gets called, and then
MyApp::Controller::Root::end gets called.  Foo::end can detach, of
course, terminating the request cycle.

Hope this helps.

Jonathan Rockway

> When setting the template name,  it forward sill still come back
> to the action that called it,  but END will forward to the view and
> deal with the template that you have set.

More information about the Catalyst mailing list