line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Date; |
2
|
47
|
|
|
47
|
|
6116669
|
use 5.012; |
|
47
|
|
|
|
|
640
|
|
3
|
47
|
|
|
47
|
|
18416
|
use Date::Rel; |
|
47
|
|
|
|
|
142
|
|
|
47
|
|
|
|
|
1562
|
|
4
|
47
|
|
|
47
|
|
21332
|
use XS::Framework; |
|
47
|
|
|
|
|
388864
|
|
|
47
|
|
|
|
|
1875
|
|
5
|
47
|
|
|
47
|
|
451
|
use XS::Install::Payload; |
|
47
|
|
|
|
|
153
|
|
|
47
|
|
|
|
|
14007
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '5.2.6'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
XS::Loader::bootstrap(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__init__(); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub __init__ { |
14
|
47
|
|
|
47
|
|
227
|
my $dir = XS::Install::Payload::payload_dir('Date'); |
15
|
47
|
|
|
|
|
7367
|
tzembededdir("$dir/zoneinfo"); |
16
|
47
|
50
|
|
|
|
782
|
use_embed_timezones() unless tzsysdir(); # use embed zones by default where system zones are unavailable |
17
|
47
|
|
|
|
|
666
|
*Date::errc:: = *Date::Error::; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Export::XS::Auto->import( |
21
|
|
|
|
|
|
|
SEC => rdate_const("1s"), |
22
|
|
|
|
|
|
|
MIN => rdate_const("1m"), |
23
|
|
|
|
|
|
|
HOUR => rdate_const("1h"), |
24
|
|
|
|
|
|
|
DAY => rdate_const("1D"), |
25
|
|
|
|
|
|
|
WEEK => rdate_const("1W"), |
26
|
|
|
|
|
|
|
MONTH => rdate_const("1M"), |
27
|
|
|
|
|
|
|
YEAR => rdate_const("1Y"), |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
use overload |
31
|
47
|
|
|
|
|
615
|
'""' => \&_op_str, |
32
|
|
|
|
|
|
|
'bool' => \&to_bool, |
33
|
|
|
|
|
|
|
'0+' => \&to_number, |
34
|
|
|
|
|
|
|
'<=>' => \&compare, |
35
|
|
|
|
|
|
|
'cmp' => \&compare, |
36
|
|
|
|
|
|
|
'+' => \&sum, |
37
|
|
|
|
|
|
|
'+=' => \&add, |
38
|
|
|
|
|
|
|
'-' => \&difference, |
39
|
|
|
|
|
|
|
'-=' => \&subtract, |
40
|
|
|
|
|
|
|
'=' => \&Date::__assign_stub, |
41
|
|
|
|
|
|
|
fallback => 1, |
42
|
47
|
|
|
47
|
|
408
|
; |
|
47
|
|
|
|
|
105
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |