Test::Proto::Alternation - represent an alternation in array validation
pArray->contains_only(pAlternation('a', pSeries('b', 'c'))); # will validate ['a'] and ['b', 'c'] as true
Used in array validation to represent different options. Equivalent to
| in a regular expression. There is no limit to the number of alternatives which may be specified, but there must be at least one. This can handle nested Test::Proto::Series and Test::Proto::Repeatable elements, and can be nested within them.
For single-item alternation consider using
Each argument is a different alternative.
die unless exists $alternation->alternatives->;
A chainable getter/setter method for the different alternatives available to the alternation.