line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Lint::Pluggable::WhiteList; |
2
|
2
|
|
|
2
|
|
756
|
use 5.008_001; |
|
2
|
|
|
|
|
6
|
|
3
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
31
|
|
4
|
2
|
|
|
2
|
|
6
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
76
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
10
|
use Carp qw/croak/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
371
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
10
|
|
|
10
|
0
|
21
|
my($class, $lint, $conf) = @_; |
12
|
|
|
|
|
|
|
|
13
|
10
|
50
|
|
|
|
71
|
my $rule = $conf->{rule} or croak 'required option: rule'; |
14
|
|
|
|
|
|
|
$lint->override(gripe => sub { |
15
|
10
|
|
|
10
|
|
15
|
my $super = shift; |
16
|
|
|
|
|
|
|
return sub { |
17
|
37
|
|
|
37
|
|
8962
|
my $self = shift; |
18
|
37
|
|
|
|
|
52
|
my $errcode = shift; |
19
|
37
|
|
|
|
|
78
|
my %errparms = @_; |
20
|
|
|
|
|
|
|
|
21
|
37
|
100
|
|
|
|
86
|
if (my $is_whitelist = $rule->{$errcode}) { |
22
|
32
|
100
|
|
|
|
68
|
return if $is_whitelist->(\%errparms); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
11
|
|
|
|
|
31
|
$self->$super($errcode, %errparms); |
26
|
10
|
|
|
|
|
37
|
}; |
27
|
10
|
|
|
|
|
55
|
}); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
__END__ |