line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Net::Songkick::Types - Useful type stuff for Net::Songkick |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Net::Songkick::Types; |
8
|
|
|
|
|
|
|
# This really won't be very useful outside of Net::Songkick. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Net::Songkick::Types; |
13
|
|
|
|
|
|
|
|
14
|
6
|
|
|
6
|
|
49
|
use Moose::Util::TypeConstraints; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
86
|
|
15
|
6
|
|
|
6
|
|
17017
|
use Data::Dumper; |
|
6
|
|
|
|
|
44369
|
|
|
6
|
|
|
|
|
496
|
|
16
|
6
|
|
|
6
|
|
4077
|
use DateTime::Format::Strptime; |
|
6
|
|
|
|
|
832218
|
|
|
6
|
|
|
|
|
34
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
subtype 'Net::Songkick::DateTime', |
19
|
|
|
|
|
|
|
as 'DateTime'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
coerce 'Net::Songkick::DateTime', |
22
|
|
|
|
|
|
|
from 'HashRef', |
23
|
|
|
|
|
|
|
via { |
24
|
|
|
|
|
|
|
my $dt = $_->{datetime} ? |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
DateTime::Format::Strptime->new( |
27
|
|
|
|
|
|
|
pattern => '%Y-%m-%dT%H:%M:%S%z', |
28
|
|
|
|
|
|
|
)->parse_datetime($_->{datetime}) : |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
DateTime::Format::Strptime->new( |
31
|
|
|
|
|
|
|
pattern => '%Y-%m-%d', |
32
|
|
|
|
|
|
|
)->parse_datetime($_->{date}) ; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
return $dt; |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Dave Cross <dave@perlhacks.com> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SEE ALSO |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
L<Net::Songkick> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Copyright (C) 2016, Magnum Solutions Ltd. All Rights Reserved. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This script is free software; you can redistribute it and/or modify it |
52
|
|
|
|
|
|
|
under the same terms as Perl itself. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |