TPath/TypeConstraints.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
« TPath/Test/Compound.pm ↑ Summary TPath/Selector/Expression.pm »
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__
« TPath/Test/Compound.pm ↑ Summary TPath/Selector/Expression.pm »