| 1 | # This code is part of Perl distribution Log-Report version 1.46. | ||||||||||||||||||||||||||||
| 2 | # The POD got stripped from this file by OODoc version 3.06. | ||||||||||||||||||||||||||||
| 3 | # For contributors see file ChangeLog. | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | # This software is copyright (c) 2007-2026 by Mark Overmeer. | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 8 | # the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 9 | # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | package Log::Report::Translator;{ | ||||||||||||||||||||||||||||
| 13 | 17 | our $VERSION = '1.46'; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 17 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | 17 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 17 | ▶ | use Log::Report 'log-report', import => [ ]; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | #-------------------- | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 12 | ▶ | sub new(@) { my $class = shift; (bless {}, $class)->init({@_}) } | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 25 | 12 | ▶ | sub init($) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | #-------------------- | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | #-------------------- | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | # this is called as last resort: if a translator cannot find | ||||||||||||||||||||||||||||
| 32 | # any lexicon or has no matching language. | ||||||||||||||||||||||||||||
| 33 | sub translate($$$) | ||||||||||||||||||||||||||||
| 34 | 100 | ▶ | { my $msg = $_[1]; | ||||||||||||||||||||||||||
|
Subroutine
translate: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 35 | 100 | ▶ | defined $msg->{_count} && $msg->{_count} != 1 ? $msg->{_plural} : $msg->{_msgid}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $msg->{"_count"} and $msg->{"_count"} != 1
MC/DC100%2/2
defined $msg->{"_count"} and $msg->{"_count"} != 1
defined $msg->{"_count"}
$msg->{"_count"} != 1
Truth table100%3/3
A and B
A= defined $msg->{"_count"}B= $msg->{"_count"} != 1
| |||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | sub load($@) { undef } | ||||||||||||||||||||||||||
|
Subroutine
load: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | 17 | 1; | |||||||||||||||||||||||||||