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