File Coverage

blib/lib/XML/Liberal/Remedy/TrailingDoctype.pm
Criterion Covered Total %
statement 3 8 37.5
branch 0 2 0.0
condition n/a
subroutine 1 2 50.0
pod 0 1 0.0
total 4 13 30.7


line stmt bran cond sub pod time code
1             package XML::Liberal::Remedy::TrailingDoctype;
2 2     2   1507 use strict;
  2         4  
  2         260  
3              
4             sub apply {
5 0     0 0   my $class = shift;
6 0           my($driver, $error, $xml_ref) = @_;
7              
8 0 0         return 0 if $error->message !~
9             /^parser error : Extra content at the end of the document/;
10              
11 0           pos($$xml_ref) = $error->location;
12 0           return $$xml_ref =~ s{\G }{}xmsi;
13             }
14              
15             1;