| 1 | package HTML::Lint::Pluggable::TinyEntitesEscapeRule; | ||||||||||
| 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.09'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use parent qw/ HTML::Lint::Pluggable::WhiteList /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use HTML::Entities qw/%char2entity/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | sub init { | ||||||||||
| 12 | 2 | ▶ | my($class, $lint) = @_; | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | $class->SUPER::init($lint => +{ | ||||||||||
| 14 | rule => +{ | ||||||||||
| 15 | 'text-use-entity' => sub { | ||||||||||
| 16 | 8 | ▶ | my $param = shift; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 17 | 8 | ▶ | return 0 if exists $char2entity{$param->{char}}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 6 | return 1; | |||||||||
| 19 | } | ||||||||||
| 20 | } | ||||||||||
| 21 | 2 | }); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | 1; | |||||||||
| 25 | __END__ | ||||||||||