File Coverage

blib/lib/Connector/Types.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             # Connector::Types
2             #
3             # Utility class containing customized Moose types and constraints
4             #
5             # Written by Martin Bartosch for the OpenXPKI project 2012
6             #
7              
8             use Moose;
9 24     24   175 use Moose::Util::TypeConstraints;
  24         39  
  24         153  
10 24     24   129196  
  24         48  
  24         241  
11             ###########################################################################
12             # Types
13             subtype 'Connector::Types::Char'
14             => as 'Str',
15             => where { length($_) == 1 }
16             => message { 'Exactly one character expected' };
17              
18             # location for a connector
19             subtype 'Connector::Types::Location'
20             => as 'Str';
21              
22             # unique key for accessing records
23             subtype 'Connector::Types::Key'
24             => as 'Str';
25              
26              
27             1;
28