line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Unixish::lcfirst; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
528
|
use 5.010; |
|
1
|
|
|
|
|
7
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
422
|
use syntax 'each_on_array'; # to support perl < 5.12 |
|
1
|
|
|
|
|
24267
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
3574
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
7
|
|
|
|
|
|
|
#use Log::Any '$log'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
456
|
use Data::Unixish::Util qw(%common_args); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
282
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.571'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our %SPEC; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$SPEC{lcfirst} = { |
16
|
|
|
|
|
|
|
v => 1.1, |
17
|
|
|
|
|
|
|
summary => 'Convert first character of text to lowercase', |
18
|
|
|
|
|
|
|
description => <<'_', |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
_ |
21
|
|
|
|
|
|
|
args => { |
22
|
|
|
|
|
|
|
%common_args, |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
tags => [qw/text itemfunc/], |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
sub lcfirst { |
27
|
1
|
|
|
1
|
1
|
4
|
my %args = @_; |
28
|
1
|
|
|
|
|
12
|
my ($in, $out) = ($args{in}, $args{out}); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
7
|
while (my ($index, $item) = each @$in) { |
31
|
5
|
|
|
|
|
9
|
push @$out, _lcfirst_item($item); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
5
|
[200, "OK"]; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _lcfirst_item { |
38
|
10
|
|
|
10
|
|
19
|
my $item = shift; |
39
|
|
|
|
|
|
|
|
40
|
10
|
100
|
66
|
|
|
31
|
if (defined($item) && !ref($item)) { |
41
|
8
|
|
|
|
|
16
|
$item = CORE::lcfirst($item); |
42
|
|
|
|
|
|
|
} |
43
|
10
|
|
|
|
|
39
|
return $item; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
# ABSTRACT: Convert first character of text to lowercase |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |