line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooX::Types::MooseLike::DateTime; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
226234
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
114
|
|
4
|
4
|
|
|
4
|
|
21
|
use strict; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
131
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
3625
|
use MooX::Types::MooseLike qw/exception_message/; |
|
4
|
|
|
|
|
13855
|
|
|
4
|
|
|
|
|
270
|
|
7
|
4
|
|
|
4
|
|
4308
|
use MooX::Types::MooseLike::Base; |
|
4
|
|
|
|
|
29900
|
|
|
4
|
|
|
|
|
282
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
47
|
use Scalar::Util qw/blessed/; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
221
|
|
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
26
|
use base 'Exporter'; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
1237
|
|
12
|
|
|
|
|
|
|
our @EXPORT_OK = (); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.01'; # VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $type_definitions = [ |
17
|
|
|
|
|
|
|
map { |
18
|
|
|
|
|
|
|
{ |
19
|
|
|
|
|
|
|
name => $_, |
20
|
|
|
|
|
|
|
subtype_of => 'Object', |
21
|
|
|
|
|
|
|
from => 'MooX::Types::MooseLike::Base', |
22
|
|
|
|
|
|
|
test => sub { blessed($_[0]) and blessed($_[0]) eq 'DateTime' }, |
23
|
|
|
|
|
|
|
message => sub { return exception_message($_[0], 'a DateTime object') } |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} qw/DateAndTime DateTime/ |
26
|
|
|
|
|
|
|
]; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
MooX::Types::MooseLike::register_types($type_definitions, __PACKAGE__, 'MooseX::Types::DateTime'); |
29
|
|
|
|
|
|
|
our %EXPORT_TAGS = (all => \@EXPORT_OK); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |