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