
alan.humphreyatcomcast.net
Apr 6, 2005, 11:16 AM
Post #4 of 5
(910 views)
Permalink
|
Is there a concept of SUPER here? In your example, how would I ensure that MyApp->end gets called? Forwarding? -----Original Message----- From: catalyst-bounces [at] lists [mailto:catalyst-bounces [at] lists] On Behalf Of Sebastian Riedel Sent: Monday, April 04, 2005 1:16 PM To: catalyst [at] lists Subject: [Catalyst] Catalyst 5 Preview, Part 2 We've been busy today fixing inheritance, and we've finally chosen a solution quite similar to Mason's autohandlers. :) package MyApp; sub begin : Private {} sub auto : Private { return 1 } sub end : Private {} package MyApp::C::Foo; sub auto : Private { return 1 } sub bar : Local {} sub end : Private {} Now if you request http://localhost:3000/foo/bar/ Cat5 would process: MyApp->begin; MyApp->auto; MyApp::C::Foo->auto; MyApp::C::Foo->bar; MyApp::C::Foo->end; So we have two built in actions (begin/end) and a processing chain in between. auto is a new built in action which like Mason's autohandlers gets called before the requested action (bar). They also have the ability to break the chain by returning 0, which is very useful for authentication and stuff. begin and end are not chained, just overloadable. Hope this wasn't too complicated, and you get an idea how things work. Btw. default works equivalent to Mason dhandlers. ;) -- sebastian _______________________________________________ Catalyst mailing list Catalyst [at] lists http://lists.rawmode.org/mailman/listinfo/catalyst
|