Personally I'd make the intent a little more obvious:
warn "wrong argument" if ref $arg{x} || !($arg{x} ~~ [qw/a b c/]);
In reply to Re: Smart matching for argument constraints
by tobyink
in thread Smart matching for argument constraints
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |