« blib/lib/HTML/Lint/Pluggable/HTML5.pm
↑ Summary
blib/lib/HTML/Lint/Pluggable/TinyEntitesEscapeRule.pm »
| 1 | package HTML::Lint::Pluggable::WhiteList; | ||||||||||
| 2 | 1 | ▶ | use 5.008_001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | our $VERSION = '0.08'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use Carp qw/croak/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | sub init { | ||||||||||
| 11 | 5 | ▶ | my($class, $lint, $conf) = @_; | ||||||||
|
Subroutine
init: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 12 | |||||||||||
| 13 | 5 | ▶ | my $rule = $conf->{rule} or croak 'required option: rule'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | $lint->override(gripe => sub { | ||||||||||
| 15 | 5 | ▶ | my $super = shift; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 16 | return sub { | ||||||||||
| 17 | 26 | ▶ | my $self = shift; | ||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||
| 18 | 26 | my $errcode = shift; | |||||||||
| 19 | 26 | my %errparms = @_; | |||||||||
| 20 | |||||||||||
| 21 | 26 | ▶ | if (my $is_whitelist = $rule->{$errcode}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 21 | ▶ | return if $is_whitelist->(\%errparms); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 9 | $self->$super($errcode, %errparms); | |||||||||
| 26 | 5 | }; | |||||||||
| 27 | 5 | }); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||
| 31 | __END__ | ||||||||||