Re: [Catalyst] best practice for a protocol mechanism?

2009-09-14 Thread Alexander Hartmaier
neater way of doing this? Some kind of best > practice? > > > Original-Nachricht ---- > > Datum: Thu, 10 Sep 2009 01:41:29 +0100 > > Von: Tomas Doran > > An: The elegant MVC web framework > > Betreff: Re: [Catalyst] best practice for a protocol mech

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-10 Thread J. Shirley
On Thu, Sep 10, 2009 at 7:24 AM, J. Shirley wrote: > > > If you use the model approach, you can use > Catalyst::Component::ACCEPT_CONTEXT to access $c->model('Schema') and > $c->user. > Err, Catalyst::Component::InstancePerContext is the right one. Don't mind me, I'm still thinking it is 2004.

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-10 Thread J. Shirley
On Thu, Sep 10, 2009 at 6:43 AM, Jens Schwarz wrote: > Oh, *err* right. I meant 'logging' and not 'protocol' *douh*. > > Well, right now I have a proto^Wlogging action in my Root controller that I > call everytime I want something to be logged in my DB. > P.ex.: > > package MyApp::Controller::Boo

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-10 Thread Jens Schwarz
s Doran > An: The elegant MVC web framework > Betreff: Re: [Catalyst] best practice for a protocol mechanism? > I'm guesstimating that he means 'I end up with this template code at > the end of loads of my actions, which forwards somewhere with various > params'... Now

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-09 Thread Tomas Doran
On 9 Sep 2009, at 21:35, Bernhard Graf wrote: Zbigniew Lukasiak wrote: I am not entirely sure that I understand what you mean by protocol action - but how about a plain old method call: MyApp::Controller::Root->myProtocolAction( $c, "some message that should be protocolled" ); I think Jens

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-09 Thread Bernhard Graf
Zbigniew Lukasiak wrote: > I am not entirely sure that I understand what you mean by protocol > action - but how about a plain old method call: > > MyApp::Controller::Root->myProtocolAction( $c, "some message that > should be protocolled" ); I think Jens is talking about logging (German: "protok

Re: [Catalyst] best practice for a protocol mechanism?

2009-09-09 Thread Zbigniew Lukasiak
On Tue, Sep 8, 2009 at 10:32 AM, Jens Schwarz wrote: > Hi, > > I currently have an Catalyst application with several controllers and even > more actions. Some of those actions require that I call my protocol action > that - surprise, surprise - does some protocol work. This action is located > i

[Catalyst] best practice for a protocol mechanism?

2009-09-08 Thread Jens Schwarz
Hi, I currently have an Catalyst application with several controllers and even more actions. Some of those actions require that I call my protocol action that - surprise, surprise - does some protocol work. This action is located in the Root controller. Right now I accomplish this with code sni