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 | 665 | use strict; | |||
1 | 2 | ||||||
1 | 30 | ||||||
4 | 1 | 1 | 523 | use XML::LibXML::Simple (); | |||
1 | 3870 | ||||||
1 | 27 | ||||||
5 | 1 | 1 | 8 | use Moo; | |||
1 | 3 | ||||||
1 | 10 | ||||||
6 | |||||||
7 | our $VERSION = '0.05'; | ||||||
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 => 0, ForceArray => 1, NsStrip => 1, KeyAttr => []); | ||||||
16 | } | ||||||
17 | |||||||
18 | 1; |