line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DateTime::Format::Strptime::Types; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
79
|
use strict; |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
376
|
|
4
|
12
|
|
|
12
|
|
58
|
use warnings; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
506
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.79'; |
7
|
|
|
|
|
|
|
|
8
|
12
|
|
|
12
|
|
62
|
use parent 'Specio::Exporter'; |
|
12
|
|
|
|
|
23
|
|
|
12
|
|
|
|
|
82
|
|
9
|
|
|
|
|
|
|
|
10
|
12
|
|
|
12
|
|
749
|
use DateTime; |
|
12
|
|
|
|
|
24
|
|
|
12
|
|
|
|
|
198
|
|
11
|
12
|
|
|
12
|
|
5787
|
use DateTime::Locale::Base; |
|
12
|
|
|
|
|
85898
|
|
|
12
|
|
|
|
|
380
|
|
12
|
12
|
|
|
12
|
|
84
|
use DateTime::Locale::FromData; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
270
|
|
13
|
12
|
|
|
12
|
|
57
|
use DateTime::TimeZone; |
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
268
|
|
14
|
12
|
|
|
12
|
|
141
|
use Specio 0.33; |
|
12
|
|
|
|
|
226
|
|
|
12
|
|
|
|
|
227
|
|
15
|
12
|
|
|
12
|
|
58
|
use Specio::Declare; |
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
50
|
|
16
|
12
|
|
|
12
|
|
2298
|
use Specio::Library::Builtins -reexport; |
|
12
|
|
|
|
|
30
|
|
|
12
|
|
|
|
|
132
|
|
17
|
12
|
|
|
12
|
|
96670
|
use Specio::Library::String -reexport; |
|
12
|
|
|
|
|
28
|
|
|
12
|
|
|
|
|
115
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
union( |
20
|
|
|
|
|
|
|
'Locale', |
21
|
|
|
|
|
|
|
of => [ |
22
|
|
|
|
|
|
|
object_isa_type('DateTime::Locale::Base'), |
23
|
|
|
|
|
|
|
object_isa_type('DateTime::Locale::FromData'), |
24
|
|
|
|
|
|
|
], |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
coerce( |
28
|
|
|
|
|
|
|
t('Locale'), |
29
|
|
|
|
|
|
|
from => t('NonEmptyStr'), |
30
|
|
|
|
|
|
|
inline => sub {"DateTime::Locale->load( $_[1] )"}, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
object_isa_type('DateTime'); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $time_zone_object = object_can_type( |
36
|
|
|
|
|
|
|
'TZObject', |
37
|
|
|
|
|
|
|
methods => [ |
38
|
|
|
|
|
|
|
qw( |
39
|
|
|
|
|
|
|
is_floating |
40
|
|
|
|
|
|
|
is_utc |
41
|
|
|
|
|
|
|
name |
42
|
|
|
|
|
|
|
offset_for_datetime |
43
|
|
|
|
|
|
|
short_name_for_datetime |
44
|
|
|
|
|
|
|
) |
45
|
|
|
|
|
|
|
], |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
declare( |
49
|
|
|
|
|
|
|
'TimeZone', |
50
|
|
|
|
|
|
|
of => [ t('NonEmptySimpleStr'), $time_zone_object ], |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
coerce( |
54
|
|
|
|
|
|
|
t('TimeZone'), |
55
|
|
|
|
|
|
|
from => t('NonEmptyStr'), |
56
|
|
|
|
|
|
|
inline => sub {"DateTime::TimeZone->new( name => $_[1] )"}, |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
union( |
60
|
|
|
|
|
|
|
'OnError', |
61
|
|
|
|
|
|
|
of => [ |
62
|
|
|
|
|
|
|
enum( values => [ 'croak', 'undef' ] ), |
63
|
|
|
|
|
|
|
t('CodeRef'), |
64
|
|
|
|
|
|
|
], |
65
|
|
|
|
|
|
|
); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
# ABSTRACT: Types used for parameter checking in DateTime::Format::Strptime |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=pod |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=encoding UTF-8 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 NAME |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
DateTime::Format::Strptime::Types - Types used for parameter checking in DateTime::Format::Strptime |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 VERSION |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
version 1.79 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 DESCRIPTION |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This module has no user-facing parts. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=for Pod::Coverage .* |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SUPPORT |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Bugs may be submitted at L<https://github.com/houseabsolute/DateTime-Format-Strptime/issues>. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
There is a mailing list available for users of this distribution, |
96
|
|
|
|
|
|
|
L<mailto:datetime@perl.org>. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
I am also usually active on IRC as 'autarch' on C<irc://irc.perl.org>. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 SOURCE |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
The source code repository for DateTime-Format-Strptime can be found at L<https://github.com/houseabsolute/DateTime-Format-Strptime>. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 AUTHORS |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=over 4 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item * |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Rick Measham <rickm@cpan.org> |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This software is Copyright (c) 2015 - 2021 by Dave Rolsky. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This is free software, licensed under: |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
The full text of the license can be found in the |
127
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |