line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::TextDomain::OO::Lexicon::File::PO; ## no critic (TidyCode)
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
5918
|
use strict;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
69
|
|
4
|
2
|
|
|
2
|
|
12
|
use warnings;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
71
|
|
5
|
2
|
|
|
2
|
|
12
|
use Carp qw(confess);
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
131
|
|
6
|
|
|
|
|
|
|
require Locale::PO;
|
7
|
2
|
|
|
2
|
|
13
|
use Moo;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
8
|
2
|
|
|
2
|
|
705
|
use MooX::StrictConstructor;
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
16
|
|
9
|
2
|
|
|
2
|
|
1901
|
use namespace::autoclean;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
18
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.031';
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with qw(
|
14
|
|
|
|
|
|
|
Locale::TextDomain::OO::Lexicon::Role::File
|
15
|
|
|
|
|
|
|
);
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub read_messages {
|
18
|
2
|
|
|
2
|
1
|
9
|
my ($self, $filename) = @_;
|
19
|
|
|
|
|
|
|
|
20
|
2
|
|
50
|
|
|
7
|
$filename ||= q{};
|
21
|
2
|
50
|
|
|
|
14
|
my $content_ref = Locale::PO->load_file_asarray($filename)
|
22
|
|
|
|
|
|
|
or confess "File not found $filename";
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
return [
|
25
|
|
|
|
|
|
|
map { ## no critic (ComplexMappings)
|
26
|
17
|
|
|
|
|
105
|
my $po = $_;
|
27
|
|
|
|
|
|
|
+{
|
28
|
|
|
|
|
|
|
do {
|
29
|
|
|
|
|
|
|
map { ## no critic (ComplexMappings)
|
30
|
17
|
|
|
|
|
29
|
my $value = $po->$_;
|
|
68
|
|
|
|
|
603
|
|
31
|
68
|
100
|
|
|
|
360
|
defined $value
|
32
|
|
|
|
|
|
|
? ( $_ => $po->dequote($value) )
|
33
|
|
|
|
|
|
|
: ();
|
34
|
|
|
|
|
|
|
} qw( msgctxt msgid msgid_plural msgstr )
|
35
|
|
|
|
|
|
|
},
|
36
|
17
|
|
|
|
|
56
|
do {
|
37
|
17
|
|
|
|
|
227
|
my $msgstr_n = $po->msgstr_n;
|
38
|
|
|
|
|
|
|
defined $msgstr_n
|
39
|
|
|
|
|
|
|
? (
|
40
|
|
|
|
|
|
|
msgstr_plural => [
|
41
|
|
|
|
|
|
|
map {
|
42
|
14
|
|
|
|
|
167
|
$po->dequote( $msgstr_n->{$_} );
|
43
|
17
|
100
|
|
|
|
124
|
} sort keys %{$msgstr_n}
|
|
6
|
|
|
|
|
23
|
|
44
|
|
|
|
|
|
|
]
|
45
|
|
|
|
|
|
|
)
|
46
|
|
|
|
|
|
|
: ();
|
47
|
|
|
|
|
|
|
},
|
48
|
|
|
|
|
|
|
};
|
49
|
2
|
|
|
|
|
5411
|
} @{$content_ref}
|
|
2
|
|
|
|
|
7
|
|
50
|
|
|
|
|
|
|
];
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1;
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__
|