blib/lib/Catalyst/Plugin/StripScripts.pm

filter: Statementstmt 61.1% 11 / 18 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 51.8% 14 / 27 CC 3 SCAR 18.7
CC
3
Cov
50%
strip_scripts
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
↑ Summary
1 package Catalyst::Plugin::StripScripts;
2  
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 1 ▶use HTML::StripScripts::Parser;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.1';
8  
9 0 ▶sub strip_scripts {
Subroutine strip_scripts: not called CC=3 SCAR=24.8
Pod undocumented
10 0 my $c = shift;
11 0 my $html = shift;
12  
13 0 ▶ return if !$html;
Branch: 1 branch
BranchTrueFalseTotal
unless $html 0 0 0
14  
15 0 my $config = $c->config->{strip_scripts};
16  
17 0 ▶ return if !ref($config) eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if !ref($config) eq "ARRAY" 0 0 0
18  
19 0 my $hss = HTML::StripScripts::Parser->new(@$config);
20  
21 0 return $hss->filter_html($html);
22 }
23  
24 1 1;
25  
26 __END__
↑ Summary