Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^5: Best option for "switch/case" functionality? (BEGIN)

by Anonymous Monk
on Jun 29, 2016 at 05:25 UTC ( [id://1166840]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Best option for "switch/case" functionality? (BEGIN)
in thread Best option for "switch/case" functionality?

The eval block?
  • Comment on Re^5: Best option for "switch/case" functionality? (BEGIN)

Replies are listed 'Best First'.
Re^6: Best option for "switch/case" functionality? (BEGIN)
by tye (Sage) on Jun 29, 2016 at 12:37 UTC

    Maybe instead of tossing off random questions, why don't you try it and see? I already did that before I posted it.

    If I wanted to make it lexically scoped to the 'eval' block, then I'd have to write:

    BEGIN { eval { BEGIN { require ...; ...->import( ... ) } ... } }

    Which, of course, I didn't.

    - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-24 20:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found