| 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
| |||||||||||
| 20 | 0 | return map $translator->translate( $_ ), @_; | |||||||||
| 21 | } else { | ||||||||||
| 22 | 0 | return @_; | |||||||||
| 23 | } | ||||||||||
| 24 | 1 | }; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 1 | 1; | |||||||||
| 28 | __END__ | ||||||||||