FormHandler/I18N.pm

filter: Statementstmt 95.4% 21 / 22 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 85.2% 29 / 34 CC 3 SCAR 6.0
CC
3
Cov
88%
maketext
3.1
__ANON__
2.0
BEGIN
1.0
CRAP 1.8
« FormHandler/Result.pm ↑ Summary FormHandler/Field/SelectCSV.pm »
1 package HTML::FormHandler::I18N;
2 # ABSTRACT: internationalization
3 147 $HTML::FormHandler::I18N::VERSION = '0.410001';
4 147 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 147 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 147 ▶use base ('Locale::Maketext');
Subroutine BEGIN: called CC=1 SCAR=0.0
7 147 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub maketext {
10 880 ▶ my ( $lh, @message ) = @_;
Subroutine maketext: called CC=3 SCAR=11.4
Pod undocumented
11 880 ▶ return '' unless scalar @message;
Branch: 1 branch
BranchTrueFalseTotal
unless scalar @message 0 880 880
12 880 ▶ return '' unless defined $message[0];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $message[0] 0 880 880
13 880 my $out;
14 try {
15 880 ▶ $out = $lh->SUPER::maketext(@message);
Subroutine __ANON__: called CC=1 SCAR=0.0
16 }
17 catch {
18 0 ▶ die "Unable to do maketext on: " . $message[0] .
Subroutine __ANON__: not called CC=1 SCAR=6.9
19 "\nIf the message contains brackets you may need to escape them with a tilde.";
20 880 };
21 880 return $out;
22 }
23  
24 147 1;
25  
26 __END__
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 HTML::FormHandler::I18N - internationalization
35  
36 =head1 VERSION
37  
38 version 0.410001
39  
40 =head1 AUTHOR
41  
42 FormHandler Contributors - see HTML::FormHandler
43  
44 =head1 COPYRIGHT AND LICENSE
45  
46 This software is copyright (c) 2017 by Gerda Shank.
47  
48 This is free software; you can redistribute it and/or modify it under
49 the same terms as the Perl 5 programming language system itself.
50  
51 =cut
« FormHandler/Result.pm ↑ Summary FormHandler/Field/SelectCSV.pm »