line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Sah::Coerce::perl::str::str_tolower; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $DATE = '2019-07-25'; # DATE |
4
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
2026
|
use 5.010001; |
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
149
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub meta { |
11
|
|
|
|
|
|
|
+{ |
12
|
1
|
|
|
1
|
0
|
12
|
v => 4, |
13
|
|
|
|
|
|
|
prio => 50, |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub coerce { |
18
|
1
|
|
|
1
|
0
|
17
|
my %args = @_; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
2
|
my $dt = $args{data_term}; |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
2
|
my $res = {}; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
3
|
$res->{expr_match} = "!ref($dt)"; |
25
|
1
|
|
|
|
|
3
|
$res->{expr_coerce} = join( |
26
|
|
|
|
|
|
|
"", |
27
|
|
|
|
|
|
|
"lc($dt)", |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
$res; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
# ABSTRACT: Coerce string to lower case |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Data::Sah::Coerce::perl::str::str_tolower - Coerce string to lower case |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This document describes version 0.003 of Data::Sah::Coerce::perl::str::str_tolower (from Perl distribution Data-Sah-Coerce-perl-str-str_toupper), released on 2019-07-25. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
The rule is not enabled by default. You can enable it in a schema using e.g.: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
["str", "x.perl.coerce_rules"=>["str_tolower"]] |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=for Pod::Coverage ^(meta|coerce)$ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 HOMEPAGE |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Please visit the project's homepage at L<https://metacpan.org/release/Data-Sah-Coerce-perl-str-str_toupper>. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SOURCE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Source repository is at L<https://github.com/perlancar/perl-Data-Sah-Coerce-perl-str-str_toupper>. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 BUGS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah-Coerce-perl-str-str_toupper> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
When submitting a bug or request, please include a test-file or a |
71
|
|
|
|
|
|
|
patch to an existing test-file that illustrates the bug or desired |
72
|
|
|
|
|
|
|
feature. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
perlancar <perlancar@cpan.org> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This software is copyright (c) 2019, 2018 by perlancar@cpan.org. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
83
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |