line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Lint::Pluggable::RDFa; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
415
|
use 5.008_001; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
17
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use parent qw/ HTML::Lint::Pluggable::WhiteList /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %rdfa_attrs = map { $_ => 1 } qw/ |
10
|
|
|
|
|
|
|
about content datatype inlist prefix property rel resource rev |
11
|
|
|
|
|
|
|
typeof vocab /; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init { |
14
|
2
|
|
|
2
|
0
|
3
|
my ( $class, $lint ) = @_; |
15
|
|
|
|
|
|
|
$class->SUPER::init( |
16
|
|
|
|
|
|
|
$lint => +{ |
17
|
|
|
|
|
|
|
rule => +{ |
18
|
|
|
|
|
|
|
'attr-unknown' => sub { |
19
|
4
|
|
|
4
|
|
4
|
my $param = shift; |
20
|
4
|
|
50
|
|
|
15
|
return exists $rdfa_attrs{ $param->{attr} } || 0; |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
2
|
|
|
|
|
13
|
); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |