line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Unixish::lcfirst; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
424
|
use 5.010; |
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
356
|
use syntax 'each_on_array'; # to support perl < 5.12 |
|
1
|
|
|
|
|
19608
|
|
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
2959
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
7
|
|
|
|
|
|
|
#use Log::Any '$log'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
396
|
use Data::Unixish::Util qw(%common_args); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
237
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.572'; # 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
|
|
|
|
|
2
|
my ($in, $out) = ($args{in}, $args{out}); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
6
|
while (my ($index, $item) = each @$in) { |
31
|
5
|
|
|
|
|
7
|
push @$out, _lcfirst_item($item); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
4
|
[200, "OK"]; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _lcfirst_item { |
38
|
10
|
|
|
10
|
|
11
|
my $item = shift; |
39
|
|
|
|
|
|
|
|
40
|
10
|
100
|
66
|
|
|
28
|
if (defined($item) && !ref($item)) { |
41
|
8
|
|
|
|
|
12
|
$item = CORE::lcfirst($item); |
42
|
|
|
|
|
|
|
} |
43
|
10
|
|
|
|
|
34
|
return $item; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
# ABSTRACT: Convert first character of text to lowercase |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |