line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::HTTP::API::Parser::XML; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
20471
|
$Net::HTTP::API::Parser::XML::VERSION = '0.14'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: Parse XML result |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1459
|
use XML::Simple; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Moose; |
10
|
|
|
|
|
|
|
extends 'Net::HTTP::API::Parser'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has _xml_parser => ( |
13
|
|
|
|
|
|
|
is => 'rw', |
14
|
|
|
|
|
|
|
isa => 'XML::Simple', |
15
|
|
|
|
|
|
|
lazy => 1, |
16
|
|
|
|
|
|
|
default => sub { XML::SImple->new(ForceArray => 0) } |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub encode { |
20
|
|
|
|
|
|
|
my ($self, $content) = @_; |
21
|
|
|
|
|
|
|
return $self->_xml_parser->XMLin($content); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub decode { |
25
|
|
|
|
|
|
|
my ($self, $content) = @_; |
26
|
|
|
|
|
|
|
return $self->_xml_parser->XMLout($content); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Net::HTTP::API::Parser::XML - Parse XML result |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 VERSION |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
version 0.14 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 AUTHOR |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
franck cuny <franck@lumberjaph.net> |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This software is copyright (c) 2010 by linkfluence. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
56
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|