File Coverage

blib/lib/WebService/LiveJournal/RPC.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             package WebService::LiveJournal::RPC;
2              
3 1     1   2532 use strict;
  1         3  
  1         39  
4 1     1   6 use warnings;
  1         3  
  1         34  
5 1     1   6 use Exporter;
  1         2  
  1         46  
6 1     1   521 use RPC::XML;
  0            
  0            
7             use RPC::XML::ParserFactory;
8             use RPC::XML::Client;
9             our @ISA = qw/ Exporter /;
10             our @EXPORT_OK = qw/ xml2hashref xml2hash /;
11              
12             # ABSTRACT: RPC utilities for WebService::LiveJournal
13             our $VERSION = '0.07'; # VERSION
14              
15             my $parser = new RPC::XML::ParserFactory;
16              
17             sub xml2hashref
18             {
19             my $xml = shift;
20             my $response = $parser->parse($xml);
21             my $struct = $response->value;
22             my $hash = $struct->value;
23             }
24              
25             sub xml2hash { %{ xml2hashref(@_) } }
26              
27             1;
28              
29             __END__