line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package XML::OPML::LibXML; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
1675
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
149
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
1339
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use XML::OPML::LibXML::Document; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
|
|
|
|
|
|
my $class = shift; |
11
|
|
|
|
|
|
|
bless { |
12
|
|
|
|
|
|
|
parser => XML::LibXML->new, |
13
|
|
|
|
|
|
|
}, $class; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
for my $method (qw( parse_string parse_fh parse_file )) { |
17
|
|
|
|
|
|
|
no strict 'refs'; |
18
|
|
|
|
|
|
|
*$method = sub { |
19
|
|
|
|
|
|
|
my $self = shift; |
20
|
|
|
|
|
|
|
my $dom = $self->{parser}->$method(@_); |
21
|
|
|
|
|
|
|
XML::OPML::LibXML::Document->new_from_doc($dom); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |