| 1 | package TPath::TypeConstraints; | ||
| 2 | $TPath::TypeConstraints::VERSION = '1.007'; | ||
| 3 | # ABSTRACT: assorted type constraints | ||
| 4 | |||
| 5 | 53 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 0 | ▶ | use TPath::Grammar qw(%AXES); |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 7 | |||
| 8 | sub prefix(@); | ||
| 9 | |||
| 10 | class_type $_ | ||
| 11 | for prefix qw(Attribute Expression AttributeTest Math Function Concatenation); | ||
| 12 | |||
| 13 | role_type $_ | ||
| 14 | for prefix qw(Test::Boolean Selector Forester Predicate Numifiable); | ||
| 15 | |||
| 16 | union ATArg => [qw( Num TPath::Numifiable Str TPath::Concatenation )]; | ||
| 17 | |||
| 18 | union CondArg => | ||
| 19 | [ prefix qw(Attribute Expression AttributeTest Test::Boolean) ]; | ||
| 20 | |||
| 21 | union ConcatArg => | ||
| 22 | [ qw( Num Str ), prefix qw( Attribute Expression Math ) ]; | ||
| 23 | |||
| 24 | union MathArg => [qw(TPath::Numifiable Num)]; | ||
| 25 | |||
| 26 | enum Quantifier => [qw( * + ? e )]; | ||
| 27 | |||
| 28 | enum Axis => [ keys %AXES ]; | ||
| 29 | |||
| 30 | sub prefix(@) { | ||
| 31 | map { "TPath::$_" } @_; | ||
| 32 | } | ||
| 33 | |||
| 34 | __END__ | ||