blib/lib/Catmandu/Importer/Pure/Parser/simple.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 11 | 81.8 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 16 | 75.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Catmandu::Importer::Pure::Parser::simple; | ||||||
2 | |||||||
3 | 1 | 1 | 554 | use strict; | |||
1 | 3 | ||||||
1 | 26 | ||||||
4 | 1 | 1 | 437 | use XML::LibXML::Simple (); | |||
1 | 3216 | ||||||
1 | 22 | ||||||
5 | 1 | 1 | 6 | use Moo; | |||
1 | 1 | ||||||
1 | 7 | ||||||
6 | |||||||
7 | our $VERSION = '0.04'; | ||||||
8 | |||||||
9 | has xmlsimple => ( is => 'ro', default => sub { XML::LibXML::Simple->new } ); | ||||||
10 | |||||||
11 | sub parse { | ||||||
12 | 0 | 0 | 0 | my ($self, $dom) = @_; | |||
13 | |||||||
14 | 0 | $self->xmlsimple->XMLin( | |||||
15 | $dom , KeepRoot => 1, ForceArray => 1, NsStrip => 1, KeyAttr => []); | ||||||
16 | } | ||||||
17 | |||||||
18 | 1; |