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

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.5% 28 / 29 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DTL/Fast/Filter/Capfirst.pm ↑ Summary blib/lib/DTL/Fast/Filter/Urlencode.pm »
1 package DTL::Fast::Filter::Title;
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{'title'} = __PACKAGE__;
6  
7 2 ▶use locale;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #@Override
10 sub filter
11 {
12 1 ▶ shift; # self
Subroutine filter: called CC=1 SCAR=0.0
Pod undocumented
13 1 shift; # filter_manager
14 1 my $value = lc(shift); # value
15
16 1 $value =~ s/\b(.)/\U$1/gs;
17
18 1 return $value;
19 }
20  
21 2 1;
« blib/lib/DTL/Fast/Filter/Capfirst.pm ↑ Summary blib/lib/DTL/Fast/Filter/Urlencode.pm »