blib/lib/File/Find/Rule/WellFormed.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 15 | 86.6 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | n/a | ||
total | 18 | 20 | 90.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package File::Find::Rule::WellFormed; | ||||||
2 | |||||||
3 | 2 | 2 | 106126 | use strict; | |||
2 | 6 | ||||||
2 | 96 | ||||||
4 | 2 | 2 | 12 | use vars qw($VERSION); | |||
2 | 4 | ||||||
2 | 111 | ||||||
5 | 2 | 2 | 13 | use base qw(File::Find::Rule); | |||
2 | 8 | ||||||
2 | 317 | ||||||
6 | |||||||
7 | 2 | 2 | 15 | use File::Find::Rule; | |||
2 | 3 | ||||||
2 | 21 | ||||||
8 | 2 | 2 | 1330 | use XML::Parser; | |||
0 | |||||||
0 | |||||||
9 | |||||||
10 | sub File::Find::Rule::wellformed () { | ||||||
11 | my $self = shift->_force_object(); | ||||||
12 | |||||||
13 | $self->exec(sub { eval { XML::Parser->new->parsefile(shift) } }); | ||||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 | |||||||
18 | __END__ |