[Catalyst] best practice for a protocol mechanism?

Jens Schwarz blacky6767 at gmx.de
Thu Sep 10 12:43:41 GMT 2009

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.

package MyApp::Controller::Book;
sub create ... {
$c->forward("MyApp::Controller::Root","myLoggingAction",["some message that should be logged"]);

In addition to this, I have a logging controller, that simply displays the list of logged messages from the DB.

Think of something like:

| Timestamp        | User   | Action           |
| 2009-09-10 10:30 | foobar | created new book |

So the question is: Is there a neater way of doing this? Some kind of best practice?

-------- Original-Nachricht --------
> Datum: Thu, 10 Sep 2009 01:41:29 +0100
> Von: Tomas Doran <bobtfish at bobtfish.net>
> An: The elegant MVC web framework <catalyst at lists.scsys.co.uk>
> 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 *I* am not entirely sure that I understand what you mean by this. :)


Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

More information about the Catalyst mailing list