| 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; | |