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 148 $HTML::FormHandler::I18N::VERSION = '0.410002';
4 148 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 148 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 148 ▶use base ('Locale::Maketext');
Subroutine BEGIN: called CC=1 SCAR=0.0
7 148 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 886 ▶sub maketext {
Subroutine maketext: called CC=3 SCAR=11.4
Pod undocumented
10 886 my ( $lh, @message ) = @_;
11 886 ▶ return '' unless scalar @message;
Branch: 1 branch
BranchTrueFalseTotal
unless scalar @message 0 886 886
12 886 ▶ return '' unless defined $message[0];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $message[0] 0 886 886
13 886 my $out;
14 886 ▶ try {
Subroutine __ANON__: called CC=1 SCAR=0.0
15 886 $out = $lh->SUPER::maketext(@message);
16 }
17 0 ▶ catch {
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 0 die "Unable to do maketext on: " . $message[0] .
19 "\nIf the message contains brackets you may need to escape them with a tilde.";
20 886 };
21 886 return $out;
22 }
23  
24 148 1;
25  
26 __END__
« FormHandler/Result.pm ↑ Summary FormHandler/Field/SelectCSV.pm »