Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: To Moose or not To Moose.. ?

by PerlSufi (Friar)
on Jun 09, 2014 at 20:52 UTC ( [id://1089330]=note: print w/replies, xml ) Need Help??


in reply to Re: To Moose or not To Moose.. ?
in thread To Moose or not To Moose.. ?

Good call, boftx - thanks. I'll do if/else statements for now -along with the export sub idea..

Replies are listed 'Best First'.
Re^3: To Moose or not To Moose.. ?
by boftx (Deacon) on Jun 09, 2014 at 20:58 UTC

    The code given by Your_Mother has an excellent example of building the hash and then keeping it handy if you are in a persistent environment. I would definitely use something like that.

    Update: Anytime I find myself with more than 1 or maybe 2 elsif statements I start thinking about using a hash with keys corresponding to what the condition being tested for is if possible. In broad terms, that is creating a dispatch table.

    You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-18 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found