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