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