Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 taking refuge in the Monastery: (3)
As of 2016-07-02 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (19 votes). Check out past polls.