lib/WWW/Shopify/Liquid/Filter/NewlineToBr.pm

filter: Statementstmt 71.4% 10 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 61.9% 13 / 21 CC 2 SCAR 11.0
CC
2
Cov
62%
operate
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« lib/WWW/Shopify/Liquid/Operator.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/Remove.pm »
1 #!/usr/bin/perl
2 38 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 38 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 38 ▶package WWW::Shopify::Liquid::Filter::NewlineToBr; use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 0 ▶sub operate {
Subroutine operate: not called CC=2 SCAR=17.9
Pod undocumented
7 0 my $str = $_[2];
8 0 ▶ $str = '' unless defined $str;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $str 0 0 0
9 0 $str =~ s/(\r\n|\n|\r)/<br\/>/g;
10 0 return $str;
11 }
12  
13 38 1;
« lib/WWW/Shopify/Liquid/Operator.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/Remove.pm »