| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WebService::Eventful::YAML; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1120
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
39
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
28
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
290
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
WebService::Eventful::YAML - Use the YAML flavor of the Eventful API |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $evdb = WebService::Eventful->new(app_key => $app_key, flavor => 'yaml'); |
|
14
|
|
|
|
|
|
|
my $results = $evdb->call('events/get', { id => 'E0-001-001336058-5' }); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Parses YAML from the Eventful API. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 VERSION |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1.0 - September 2006 |
|
23
|
|
|
|
|
|
|
1.04 - August 2013 |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
our $VERSION = 1.04; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 flavor |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Return the flavor name. |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub flavor { 'yaml' } |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 ctype |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Return a checkstring for the expected return content type. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub ctype { 'yaml' } |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 parse |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Parse YAML data from the Eventful API using L or L. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub parse { |
|
54
|
0
|
|
|
0
|
1
|
|
my ($class, $data, $force_array) = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
0
|
0
|
|
|
|
|
carp "Forcing arrays is not supported for API flavor " . $class->flavor |
|
57
|
|
|
|
|
|
|
if $force_array; |
|
58
|
|
|
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
eval { require YAML::Syck }; |
|
|
0
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
|
if ($@) { |
|
61
|
0
|
|
|
|
|
|
require YAML; |
|
62
|
0
|
|
|
|
|
|
return YAML::Load($data); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
else { |
|
65
|
0
|
|
|
|
|
|
return YAML::Syck::Load($data); |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHORS |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=over 4 |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * Daniel Westermann-Clark Edanieltwc@cpan.orgE |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 LICENSE |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
80
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * L |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * L |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item * L |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=cut |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |