Not exactly sure what you want to accomplish but "any of" sounds like a union:
use Types::Standard qw( ArrayRef HashRef ScalarRef ); my ( @thing1, %thing2, $thing3 ); my $union = ArrayRef | HashRef; $union->check( \@thing1 ); # true $union->check( \%thing1 ); # true $union->check( \$thing1 ); # false ( ArrayRef | HashRef | ScalarRef )->check( \$thing1 ); # true
In reply to Re: Type::Tiny and anyOf, oneOf
by tobyink
in thread Type::Tiny and anyOf, oneOf
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |