| blib/lib/XML/Liberal/Remedy/TrailingDoctype.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 8 | 8 | 100.0 |
| branch | 2 | 2 | 100.0 |
| condition | n/a | ||
| subroutine | 2 | 2 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 12 | 13 | 92.3 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package XML::Liberal::Remedy::TrailingDoctype; | ||||||
| 2 | 5 | 5 | 2031 | use strict; | |||
| 5 | 6 | ||||||
| 5 | 553 | ||||||
| 3 | |||||||
| 4 | sub apply { | ||||||
| 5 | 65 | 65 | 0 | 93 | my $class = shift; | ||
| 6 | 65 | 111 | my($driver, $error, $xml_ref) = @_; | ||||
| 7 | |||||||
| 8 | 65 | 100 | 117 | return 0 if $error->message !~ | |||
| 9 | /^parser error : Extra content at the end of the document/; | ||||||
| 10 | |||||||
| 11 | 20 | 195 | pos($$xml_ref) = $error->location; | ||||
| 12 | 20 | 271 | return $$xml_ref =~ s{\G }{}xmsi; | ||||
| 13 | } | ||||||
| 14 | |||||||
| 15 | 1; |