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
|
|
|
|
|
|
|
package Connector::Types; |
8
|
|
|
|
|
|
|
|
9
|
24
|
|
|
24
|
|
217
|
use Moose; |
|
24
|
|
|
|
|
56
|
|
|
24
|
|
|
|
|
176
|
|
10
|
24
|
|
|
24
|
|
154251
|
use Moose::Util::TypeConstraints; |
|
24
|
|
|
|
|
59
|
|
|
24
|
|
|
|
|
296
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
########################################################################### |
13
|
|
|
|
|
|
|
# Types |
14
|
|
|
|
|
|
|
subtype 'Connector::Types::Char' |
15
|
|
|
|
|
|
|
=> as 'Str', |
16
|
|
|
|
|
|
|
=> where { length($_) == 1 } |
17
|
|
|
|
|
|
|
=> message { 'Exactly one character expected' }; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# location for a connector |
20
|
|
|
|
|
|
|
subtype 'Connector::Types::Location' |
21
|
|
|
|
|
|
|
=> as 'Str'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# unique key for accessing records |
24
|
|
|
|
|
|
|
subtype 'Connector::Types::Key' |
25
|
|
|
|
|
|
|
=> as 'Str'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|