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