OO/Lexicon/Role/GettextToMaketext.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 34 / 34 CC 4 SCAR 8.5
CC
4
Cov
100%
gettext_to_maketext
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« OO/Lexicon/File/PO.pm ↑ Summary OO/Plugin/Expand/BabelFish/Loc/DomainAndCategory.pm »
1 package Locale::TextDomain::OO::Lexicon::Role::GettextToMaketext; ## no critic (TidyCode)
2
3 22 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 22 ▶use Locale::Utils::PlaceholderMaketext;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 22 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8
9 22 our $VERSION = '1.000';
10
11 19 ▶sub gettext_to_maketext {
Subroutine gettext_to_maketext: called CC=4 SCAR=13.9
Pod documented
12 19 my ($self, $messages_ref) = @_;
13
14 19 my $formatter = Locale::Utils::PlaceholderMaketext->new;
15 19 for my $value ( @{$messages_ref} ) {
16 162 for ( qw( msgid msgstr ) ) {
17 324 ▶ if ( exists $value->{$_} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $value->{$_}) 251 73 324
18 $value->{$_}
19 251 = $formatter->gettext_to_maketext( $value->{$_} );
20 }
21 }
22 }
23
24 19 return $self;
25 }
26
27 22 1;
28
29 __END__
« OO/Lexicon/File/PO.pm ↑ Summary OO/Plugin/Expand/BabelFish/Loc/DomainAndCategory.pm »