Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Restricting a scalar to certain values

by Anonymous Monk
on Jun 20, 2013 at 08:56 UTC ( #1039920=note: print w/ replies, xml ) Need Help??


in reply to Restricting a scalar to certain values

Thanks jakeease and Anonymous for the feedback so far! I just thought I'd clarify: Yes, it's a bit like an enum - the thing is though that I'd like to retrofit some older scripts that already use a scalar as an enum. It'd be an advantage if I could just add a line at the top saying "restrict this scalar to this set of allowed values" to protect against future typos instead of updating every place where the scalar is used.


Comment on Re: Restricting a scalar to certain values

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-28 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls