Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Given When Syntax

by Deep_Plaid (Acolyte)
on Mar 15, 2014 at 16:12 UTC ( #1078458=note: print w/replies, xml ) Need Help??


in reply to Re: Given When Syntax
in thread Given When Syntax

Hi HazyLife. I did consider using the Switch module, but I had read that it is being deprecated and that I should be using given/when, and that is is more efficient. No other reason I can't or won't - I was just curious why I'm getting the syntax errors for given/when. Also, this is a part of a much larger script that has a long processing time and I'm trying to be as efficient as possible. Thanks for your input!

Replies are listed 'Best First'.
Re^3: Given When Syntax
by ww (Archbishop) on Mar 15, 2014 at 16:29 UTC

    re hazylife's observation, you need to understand that...
          use feature "switch";" is NOT EQUAL to use Switch;.


    Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
    1. code
    2. verbatim error and/or warning messages
    3. a coherent explanation of what "doesn't work actually means.
      True, but the switch and smartmatching features (given+when and ~~) are also experimental and likely to change.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2019-10-20 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?