lib/Serge/Engine/Plugin/Transform/whitespace.pm

filter: Statementstmt 38.8% 7 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 34.6% 9 / 26 SCAR 2.1
CC
1
Cov
39%
name
2.0
filter_key
2.0
transform
2.0
CRAP 1.2
« lib/Serge/Engine/Plugin/parse_keyvalue.pm ↑ Summary lib/Serge/Engine/Plugin/Base/Transform.pm »
1 package Serge::Engine::Plugin::Transform::whitespace;
2 1 ▶use parent Serge::Engine::Plugin::Base::Transform;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub name {
7 0 ▶ return 'Whitespace normalization plugin';
Subroutine name: not called CC=1 SCAR=6.9
Pod undocumented
8 }
9  
10 sub filter_key {
11 0 ▶ my ($self, $s) = @_;
Subroutine filter_key: not called CC=1 SCAR=6.9
Pod undocumented
12  
13 0 $s =~ s/\s+/ /sg;
14 0 $s =~ s/^\s+//sg;
15 0 $s =~ s/\s+$//sg;
16 0 return $s;
17 }
18  
19 sub transform {
20 0 ▶ my ($self, $s) = @_;
Subroutine transform: not called CC=1 SCAR=6.9
Pod undocumented
21  
22 0 $s =~ s/\s+/ /sg;
23 0 $s =~ s/^\s+//sg;
24 0 $s =~ s/\s+$//sg;
25 0 return $s;
26 }
27  
28 1 1;
« lib/Serge/Engine/Plugin/parse_keyvalue.pm ↑ Summary lib/Serge/Engine/Plugin/Base/Transform.pm »