line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package PRANG::Cookbook::Role::Time; |
3
|
|
|
|
|
|
|
$PRANG::Cookbook::Role::Time::VERSION = '0.21'; |
4
|
2
|
|
|
2
|
|
1728
|
use Moose::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14
|
|
5
|
2
|
|
|
2
|
|
10109
|
use PRANG::Graph; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
6
|
2
|
|
|
2
|
|
1511
|
use Moose::Util::TypeConstraints; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Hour' |
9
|
|
|
|
|
|
|
=> as 'Int', |
10
|
|
|
|
|
|
|
=> where { |
11
|
|
|
|
|
|
|
$_ >= 1 and $_ <= 24; |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Minute' |
15
|
|
|
|
|
|
|
=> as 'Int', |
16
|
|
|
|
|
|
|
=> where { |
17
|
|
|
|
|
|
|
$_ >= 1 and $_ <= 60; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Second' |
21
|
|
|
|
|
|
|
=> as 'Int', |
22
|
|
|
|
|
|
|
=> where { |
23
|
|
|
|
|
|
|
$_ >= 1 and $_ <= 60; |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has_attr 'hour' => |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Hour', |
29
|
|
|
|
|
|
|
xml_required => 1, |
30
|
|
|
|
|
|
|
; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has_attr 'minute' => |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Minute', |
35
|
|
|
|
|
|
|
xml_required => 1, |
36
|
|
|
|
|
|
|
; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has_attr 'second' => |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Second', |
41
|
|
|
|
|
|
|
xml_required => 0, |
42
|
|
|
|
|
|
|
default => 0, |
43
|
|
|
|
|
|
|
; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |