blib/lib/Data/FormValidator/Filters/HTMLScrubber.pm

filter: Statementstmt 73.9% 17 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 100% 1 / 1 totaltotal 70.9% 22 / 31 CC 1 SCAR 3.6
CC
1
Cov
74%
html_scrub
2.0
__ANON__
2.0
_html_scrub
2.0
CRAP 1.4
↑ Summary
1 package Data::FormValidator::Filters::HTMLScrubber;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use HTML::Scrubber;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 require Exporter;
9 1 $VERSION = '0.02';
10 1 @ISA = qw( Exporter );
11 1 @EXPORT = qw();
12 1 %EXPORT_TAGS = (
13 'all' => [ qw( html_scrub ) ]
14 );
15 1 @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
16 }
17  
18 0 ▶sub html_scrub {
Subroutine html_scrub: not called CC=1 SCAR=6.9
Pod documented
19 0 my %args = @_;
20 0 ▶ return sub { return _html_scrub( shift, %args ) };
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 }
22  
23 0 ▶sub _html_scrub {
Subroutine _html_scrub: not called CC=1 SCAR=6.9
24 0 my ($value,%args) = @_;
25 my $scrubber = HTML::Scrubber->new(
26 default => $args{default},
27 allow => $args{allow},
28 deny => $args{deny},
29 rules => $args{rules},
30 process => $args{process},
31 comment => $args{comment}
32 0 );
33 0 return $scrubber->scrub($value);
34 }
35  
36 1 1;
37 __END__
↑ Summary