Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Cutting repetition in POE coding

by BrowserUk (Patriarch)
on Nov 26, 2005 at 12:06 UTC ( [id://511871]=note: print w/replies, xml ) Need Help??


in reply to Cutting repetition in POE coding

Why not

return EVENT $session, "argh" if $condition;

If the return value will be acted upon, then arrange the appropriate return value from the sub

sub EVENT { $kernel->post( shift, event => @_ ); 0; }; # whatever valu +e is appropriate

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://511871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-25 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found