line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::TextDomain::OO::Lexicon::File::PO; ## no critic (TidyCode)
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
5429
|
use strict;
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
65
|
|
4
|
2
|
|
|
2
|
|
14
|
use warnings;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
5
|
2
|
|
|
2
|
|
13
|
use Carp qw(confess);
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
118
|
|
6
|
|
|
|
|
|
|
require Locale::PO;
|
7
|
2
|
|
|
2
|
|
12
|
use Moo;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
8
|
2
|
|
|
2
|
|
681
|
use MooX::StrictConstructor;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
9
|
2
|
|
|
2
|
|
1793
|
use namespace::autoclean;
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
15
|
|
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
|
7
|
my ($self, $filename) = @_;
|
19
|
|
|
|
|
|
|
|
20
|
2
|
|
50
|
|
|
8
|
$filename ||= q{};
|
21
|
2
|
50
|
|
|
|
12
|
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
|
|
|
|
|
104
|
my $po = $_;
|
27
|
|
|
|
|
|
|
+{
|
28
|
|
|
|
|
|
|
do {
|
29
|
|
|
|
|
|
|
map { ## no critic (ComplexMappings)
|
30
|
17
|
|
|
|
|
32
|
my $value = $po->$_;
|
|
68
|
|
|
|
|
606
|
|
31
|
68
|
100
|
|
|
|
431
|
defined $value
|
32
|
|
|
|
|
|
|
? ( $_ => $po->dequote($value) )
|
33
|
|
|
|
|
|
|
: ();
|
34
|
|
|
|
|
|
|
} qw( msgctxt msgid msgid_plural msgstr )
|
35
|
|
|
|
|
|
|
},
|
36
|
17
|
|
|
|
|
27
|
do {
|
37
|
17
|
|
|
|
|
234
|
my $msgstr_n = $po->msgstr_n;
|
38
|
|
|
|
|
|
|
defined $msgstr_n
|
39
|
|
|
|
|
|
|
? (
|
40
|
|
|
|
|
|
|
msgstr_plural => [
|
41
|
|
|
|
|
|
|
map {
|
42
|
14
|
|
|
|
|
150
|
$po->dequote( $msgstr_n->{$_} );
|
43
|
17
|
100
|
|
|
|
127
|
} sort keys %{$msgstr_n}
|
|
6
|
|
|
|
|
27
|
|
44
|
|
|
|
|
|
|
]
|
45
|
|
|
|
|
|
|
)
|
46
|
|
|
|
|
|
|
: ();
|
47
|
|
|
|
|
|
|
},
|
48
|
|
|
|
|
|
|
};
|
49
|
2
|
|
|
|
|
5264
|
} @{$content_ref}
|
|
2
|
|
|
|
|
6
|
|
50
|
|
|
|
|
|
|
];
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1;
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__
|