line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Chompp; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
191079
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
51
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use base 'Exporter'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
399
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw/ chompp chopp /; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: chomp and chop replacements that pass the changed value(s) back |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.001'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub chompp { |
15
|
9
|
|
|
9
|
0
|
4614
|
my @val = @_; |
16
|
9
|
100
|
|
|
|
30
|
@val = ($_) unless @val; |
17
|
|
|
|
|
|
|
|
18
|
9
|
|
|
|
|
41
|
chomp foreach @val; |
19
|
9
|
100
|
|
|
|
57
|
return wantarray ? @val : $val[0]; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub chopp { |
23
|
7
|
|
|
7
|
0
|
2487
|
my @val = @_; |
24
|
7
|
100
|
|
|
|
19
|
@val = ($_) unless @val; |
25
|
|
|
|
|
|
|
|
26
|
7
|
|
|
|
|
24
|
chop foreach @val; |
27
|
7
|
100
|
|
|
|
42
|
return wantarray ? @val : $val[0]; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |