blib/lib/ACME/Error/Translate.pm

filter: Statementstmt 86.3% 19 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 80.0% 24 / 30 CC 2 SCAR 8.9
CC
2
Cov
79%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
↑ Summary
1 package ACME::Error::Translate;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use vars qw[$VERSION];
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 $VERSION = '0.01';
8  
9 1 ▶use Lingua::Translate;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 {
12 1 my $translator = undef;
13 1 ▶ sub import {
Subroutine import: called CC=1 SCAR=0.0
14 1 my $class = shift;
15 1 $translator = Lingua::Translate->new( src => 'en', dest => shift );
16 }
17  
18 0 ▶ *die_handler = *warn_handler = sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
19 0 ▶ if ( $translator ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($translator) { } 0 0 0
20 0 return map $translator->translate( $_ ), @_;
21 } else {
22 0 return @_;
23 }
24 1 };
25 }
26  
27 1 1;
28 __END__
↑ Summary