| 1 | package Data::TreeValidator::Types; | ||
| 2 | { | ||
| 3 | 7 | $Data::TreeValidator::Types::VERSION = '0.04'; | |
| 4 | } | ||
| 5 | # ABSTRACT: Internal data types used by Data::TreeValidator | ||
| 6 | 7 | ▶ | use MooseX::Types -declare => [qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | Constraint | ||
| 8 | FlatMap | ||
| 9 | Node | ||
| 10 | NodeName | ||
| 11 | Result | ||
| 12 | HashTree | ||
| 13 | Transformation | ||
| 14 | Value | ||
| 15 | 7 | )]; | |
| 16 | |||
| 17 | 7 | ▶ | use CGI::Expand qw( expand_hash ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | use MooseX::Types::Moose | ||
| 20 | 7 | ▶ | qw( ArrayRef CodeRef Str Undef ), |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 7 | Value => { -as => 'MooseValue' }; | |
| 22 | |||
| 23 | 7 | ▶ | use MooseX::Types::Structured qw( Dict Map ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | |||
| 25 | 7 | subtype HashTree, as Map[ | |
| 26 | NodeName, ArrayRef | Value | HashTree | ||
| 27 | ]; | ||
| 28 | |||
| 29 | 29 | ▶ | subtype NodeName, as Str, where { /^[^\.]+$/ }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 30 | |||
| 31 | 7 | subtype FlatMap, as Map[ Str, Value ]; | |
| 32 | |||
| 33 | 0 | ▶ | coerce HashTree, from FlatMap, via { expand_hash($_) }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 34 | |||
| 35 | 7 | role_type Node, { role => 'Data::TreeValidator::Node' }; | |
| 36 | |||
| 37 | 7 | role_type Result, { role => 'Data::TreeValidator::Result' }; | |
| 38 | |||
| 39 | 7 | subtype Value, as Undef | MooseValue; | |
| 40 | |||
| 41 | 7 | subtype Constraint, as CodeRef; | |
| 42 | 7 | subtype Transformation, as CodeRef; | |
| 43 | |||
| 44 | 7 | 1; | |
| 45 | |||
| 46 | __END__ | ||