develooper Front page | perl.perl6.users | Postings from December 2019

restricted value passed to a sub question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
December 4, 2019 08:40
Subject:
restricted value passed to a sub question
Message ID:
039471ee-ae5d-fac2-afc8-8ce20b47989e@zoho.com
Hi All,

I am cooking up something where I want top pass a value to a sub, but I 
want to restrict what those values are.

For instance, things like

    AbortRetryIgnore
    CancelRetryContinue
    Help
    YesNo
    Maybe

And so on and so forth.

If the wrong value is passed, I want the checker to crash
the sub.

What is the best way of going about this?

Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About