File Coverage

blib/lib/XML/RSS/Parser/Characters.pm
Criterion Covered Total %
statement 18 20 90.0
branch 1 2 50.0
condition n/a
subroutine 8 10 80.0
pod 2 7 28.5
total 29 39 74.3


line stmt bran cond sub pod time code
1             package XML::RSS::Parser::Characters;
2              
3 1     1   1125 use strict;
  1         2  
  1         36  
4 1     1   7 use base qw(XML::Elemental::Characters);
  1         2  
  1         916  
5              
6 1     1   258 use XML::RSS::Parser::Util qw(encode_xml);
  1         22  
  1         228  
7              
8             sub new {
9 41     41 1 5182 my $class = shift;
10 41         126 my $self = $class->SUPER::new(@_);
11 41         165 my $a = shift;
12 41 50       78 $self->data($a->{data}) if ($a);
13 41         87 $self;
14             }
15              
16 0     0 1 0 sub as_xml { encode_xml($_[0]->data) }
17              
18             ###--- hack to keep Class::XPath happy.
19 168     168 0 4182 sub qname { '' }
20 0     0 0 0 sub attributes { {} }
21 320     320 0 900 sub contents { () }
22 2     2 0 436 sub text_content { $_[0]->data; }
23 40     40 0 1004 sub attribute_qnames { }
24              
25             1;
26              
27             __END__