line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package PRANG::Cookbook::Role::Date; |
3
|
|
|
|
|
|
|
$PRANG::Cookbook::Role::Date::VERSION = '0.21'; |
4
|
2
|
|
|
2
|
|
2511
|
use Moose::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
5
|
2
|
|
|
2
|
|
11393
|
use PRANG::Graph; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
119
|
|
6
|
2
|
|
|
2
|
|
1520
|
use Moose::Util::TypeConstraints; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
31
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Year' |
9
|
|
|
|
|
|
|
=> as 'Int', |
10
|
|
|
|
|
|
|
=> where { |
11
|
|
|
|
|
|
|
length(0+$_) == 4; |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Month' |
15
|
|
|
|
|
|
|
=> as 'Int', |
16
|
|
|
|
|
|
|
=> where { |
17
|
|
|
|
|
|
|
$_ >= 1 and $_ <= 12; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Day' |
21
|
|
|
|
|
|
|
=> as 'Int', |
22
|
|
|
|
|
|
|
=> where { |
23
|
|
|
|
|
|
|
$_ >= 1 and $_ <= 31; |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has_attr 'year' => |
27
|
|
|
|
|
|
|
is => 'rw', |
28
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Year', |
29
|
|
|
|
|
|
|
xml_required => 1, |
30
|
|
|
|
|
|
|
; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has_attr 'month' => |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Month', |
35
|
|
|
|
|
|
|
xml_required => 1, |
36
|
|
|
|
|
|
|
; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has_attr 'day' => |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Day', |
41
|
|
|
|
|
|
|
xml_required => 1, |
42
|
|
|
|
|
|
|
; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |