Pluggable/Microdata.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
init
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package HTML::Lint::Pluggable::Microdata;
2  
3 use 5.008_001;
4 use strict;
5 use warnings;
6  
7 use parent qw/ HTML::Lint::Pluggable::WhiteList /;
8  
9 my %md_attrs = map { $_ => 1 } qw/
10 itemid itemprop itemref itemscope itemtype /;
11  
12 sub init {
13 my ( $class, $lint ) = @_;
14 $class->SUPER::init(
15 $lint => +{
16 rule => +{
17 'attr-unknown' => sub {
18 my $param = shift;
19 return exists $md_attrs{ $param->{attr} } || 0;
20 },
21 }
22 }
23 );
24 }
25  
26 1;
27  
28 __END__