pajout has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am seeking some general implementation of events or some ideas about it. I am not pointed to GUI, I wish events on server side (pure mod_perl), for simplifying application logic when http requests solved. My rough idea is to have ownership relation tree of object instances (some root instance which owns other container-instances of some class(es), which owns...), and when some event (represented as new object instance) happens wherever, this event is dispatched through previously described tree, potentially throwing other events. All in one request, one process or one thread.
I attempted to super search something about it, but with weak results...

Replies are listed 'Best First'.
Re: Seeking events implementation
by dragonchild (Archbishop) on Nov 10, 2005 at 13:40 UTC
    Take a look at Tree which has an events layer built in. Right now, the only events handled are when adding a child, removing a child, or setting a node's value. If you need more, please let me know.

    This event layer is also used to implement transparent persistence in the Tree::Persist distro.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re: Seeking events implementation
by radiantmatrix (Parson) on Nov 10, 2005 at 15:14 UTC

    Take a look at POE and the collection of pre-written POE::Components. POE is a generalized event system for Perl, and it sounds very close to what you want -- certainly, you should be able to implement your solution around POE with little effort.

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    "In any sufficiently large group of people, most are idiots" - Kaa's Law
Re: Seeking events implementation
by BrowserUk (Patriarch) on Nov 10, 2005 at 17:45 UTC

    I realise you have a couple of answers that may solve your problem, but I really don't understand your question. Even looking at the two answers doesn't help me, as they both seem to be addressing different interpetations of your question.

    If they are not answering your question, perhaps you would clarify it?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.