blib/lib/DTL/Fast/Filter/Addslashes.pm

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DTL/Fast/Expression/Operator/Unary/Logical.pm ↑ Summary blib/lib/DTL/Fast/Filter/Striptags.pm »
1 package DTL::Fast::Filter::Addslashes;
2 2 ▶use strict; use utf8; use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use parent 'DTL::Fast::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 $DTL::Fast::FILTER_HANDLERS{'addslashes'} = __PACKAGE__;
6  
7 #@Override
8 sub filter
9 {
10 4 ▶ shift; # self
Subroutine filter: called CC=1 SCAR=0.0
Pod undocumented
11 4 shift; # filter_manager
12 4 my $value = shift;
13 4 $value =~ s/(?<!\\)(["'])/\\$1/gs;
14 4 return $value;
15 }
16  
17 2 1;
« blib/lib/DTL/Fast/Expression/Operator/Unary/Logical.pm ↑ Summary blib/lib/DTL/Fast/Filter/Striptags.pm »