| 1 | package String::StringLight; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | our $VERSION = '0.02'; | |||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Exporter; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | our @ISA = qw( Exporter ); | |||||||||
| 11 | 1 | our @EXPORT = qw( ); | |||||||||
| 12 | 1 | our %EXPORT_TAGS = ( ); | |||||||||
| 13 | 1 | our @EXPORT_OK = qw( &trim &trimArray &space &left ); | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub trim { | ||||||||
|
Subroutine
trim: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 17 | 0 | my $s = shift; | |||||||||
| 18 | 0 | $s =~ s/\s+$//; | |||||||||
| 19 | 0 | $s =~ s/^\s+//; | |||||||||
| 20 | 0 | $s; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub trimArray { | ||||||||
|
Subroutine
trimArray: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 24 | 0 | for (@_){ | |||||||||
| 25 | 0 | s/\s+$//; | |||||||||
| 26 | 0 | s/^\s+//; | |||||||||
| 27 | } | ||||||||||
| 28 | 0 | @_; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub space { | ||||||||
|
Subroutine
space: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 32 | 0 | my $s = shift; | |||||||||
| 33 | 0 | my $t; | |||||||||
| 34 | 0 | $t .= ' ' x $s; | |||||||||
| 35 | 0 | return $t; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | ▶ | sub left { | ||||||||
|
Subroutine
left: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 39 | 0 | my $r = $_[0]; | |||||||||
| 40 | 0 | ▶ | while(length($r) < $_[1]) {$r.=' '} | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 0 | $r; | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | 1 | 1; | |||||||||
| 45 | __END__ | ||||||||||