line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Locale::TextDomain::OO::FunctionalInterface; ## no critic (TidyCode)
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
4997
|
use strict;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
51
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
73
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.000';
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
9
|
use Carp qw(confess);
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
84
|
|
9
|
2
|
|
|
2
|
|
10
|
use Scalar::Util qw(set_prototype);
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
414
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %method_name = map { $_ => undef } qw(
|
12
|
|
|
|
|
|
|
loc_begin_d
|
13
|
|
|
|
|
|
|
loc_begin_c
|
14
|
|
|
|
|
|
|
loc_begin_dc
|
15
|
|
|
|
|
|
|
loc_end_d
|
16
|
|
|
|
|
|
|
loc_end_c
|
17
|
|
|
|
|
|
|
loc_end_dc
|
18
|
|
|
|
|
|
|
loc_
|
19
|
|
|
|
|
|
|
loc_x
|
20
|
|
|
|
|
|
|
loc_n
|
21
|
|
|
|
|
|
|
loc_nx
|
22
|
|
|
|
|
|
|
loc_p
|
23
|
|
|
|
|
|
|
loc_px
|
24
|
|
|
|
|
|
|
loc_np
|
25
|
|
|
|
|
|
|
loc_npx
|
26
|
|
|
|
|
|
|
loc_d
|
27
|
|
|
|
|
|
|
loc_dx
|
28
|
|
|
|
|
|
|
loc_dn
|
29
|
|
|
|
|
|
|
loc_dnx
|
30
|
|
|
|
|
|
|
loc_dp
|
31
|
|
|
|
|
|
|
loc_dpx
|
32
|
|
|
|
|
|
|
loc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
|
|
|
|
|
|
Nloc_cnp
|
74
|
|
|
|
|
|
|
Nloc_cnpx
|
75
|
|
|
|
|
|
|
Nloc_dc
|
76
|
|
|
|
|
|
|
Nloc_dcx
|
77
|
|
|
|
|
|
|
Nloc_dcn
|
78
|
|
|
|
|
|
|
Nloc_dcnx
|
79
|
|
|
|
|
|
|
Nloc_dcp
|
80
|
|
|
|
|
|
|
Nloc_dcpx
|
81
|
|
|
|
|
|
|
Nloc_dcnp
|
82
|
|
|
|
|
|
|
Nloc_dcnpx
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
__begin_d
|
85
|
|
|
|
|
|
|
__begin_c
|
86
|
|
|
|
|
|
|
__begin_dc
|
87
|
|
|
|
|
|
|
__end_d
|
88
|
|
|
|
|
|
|
__end_c
|
89
|
|
|
|
|
|
|
__end_dc
|
90
|
|
|
|
|
|
|
__
|
91
|
|
|
|
|
|
|
__x
|
92
|
|
|
|
|
|
|
__n
|
93
|
|
|
|
|
|
|
__nx
|
94
|
|
|
|
|
|
|
__p
|
95
|
|
|
|
|
|
|
__px
|
96
|
|
|
|
|
|
|
__np
|
97
|
|
|
|
|
|
|
__npx
|
98
|
|
|
|
|
|
|
__d
|
99
|
|
|
|
|
|
|
__dx
|
100
|
|
|
|
|
|
|
__dn
|
101
|
|
|
|
|
|
|
__dnx
|
102
|
|
|
|
|
|
|
__dp
|
103
|
|
|
|
|
|
|
__dpx
|
104
|
|
|
|
|
|
|
__dnp
|
105
|
|
|
|
|
|
|
__dnpx
|
106
|
|
|
|
|
|
|
__c
|
107
|
|
|
|
|
|
|
__cx
|
108
|
|
|
|
|
|
|
__cn
|
109
|
|
|
|
|
|
|
__cnx
|
110
|
|
|
|
|
|
|
__cp
|
111
|
|
|
|
|
|
|
__cpx
|
112
|
|
|
|
|
|
|
__cnp
|
113
|
|
|
|
|
|
|
__cnpx
|
114
|
|
|
|
|
|
|
__dc
|
115
|
|
|
|
|
|
|
__dcx
|
116
|
|
|
|
|
|
|
__dcn
|
117
|
|
|
|
|
|
|
__dcnx
|
118
|
|
|
|
|
|
|
__dcp
|
119
|
|
|
|
|
|
|
__dcpx
|
120
|
|
|
|
|
|
|
__dcnp
|
121
|
|
|
|
|
|
|
__dcnpx
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
N__
|
124
|
|
|
|
|
|
|
N__x
|
125
|
|
|
|
|
|
|
N__n
|
126
|
|
|
|
|
|
|
N__nx
|
127
|
|
|
|
|
|
|
N__p
|
128
|
|
|
|
|
|
|
N__px
|
129
|
|
|
|
|
|
|
N__np
|
130
|
|
|
|
|
|
|
N__npx
|
131
|
|
|
|
|
|
|
N__d
|
132
|
|
|
|
|
|
|
N__dx
|
133
|
|
|
|
|
|
|
N__dn
|
134
|
|
|
|
|
|
|
N__dnx
|
135
|
|
|
|
|
|
|
N__dp
|
136
|
|
|
|
|
|
|
N__dpx
|
137
|
|
|
|
|
|
|
N__dnp
|
138
|
|
|
|
|
|
|
N__dnpx
|
139
|
|
|
|
|
|
|
N__c
|
140
|
|
|
|
|
|
|
N__cx
|
141
|
|
|
|
|
|
|
N__cn
|
142
|
|
|
|
|
|
|
N__cnx
|
143
|
|
|
|
|
|
|
N__cp
|
144
|
|
|
|
|
|
|
N__cpx
|
145
|
|
|
|
|
|
|
N__cnp
|
146
|
|
|
|
|
|
|
N__cnpx
|
147
|
|
|
|
|
|
|
N__dc
|
148
|
|
|
|
|
|
|
N__dcx
|
149
|
|
|
|
|
|
|
N__dcn
|
150
|
|
|
|
|
|
|
N__dcnx
|
151
|
|
|
|
|
|
|
N__dcp
|
152
|
|
|
|
|
|
|
N__dcpx
|
153
|
|
|
|
|
|
|
N__dcnp
|
154
|
|
|
|
|
|
|
N__dcnpx
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
locn
|
157
|
|
|
|
|
|
|
Nlocn
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
maketext
|
160
|
|
|
|
|
|
|
maketext_p
|
161
|
|
|
|
|
|
|
maketext_d
|
162
|
|
|
|
|
|
|
maketext_dp
|
163
|
|
|
|
|
|
|
maketext_c
|
164
|
|
|
|
|
|
|
maketext_cp
|
165
|
|
|
|
|
|
|
maketext_dc
|
166
|
|
|
|
|
|
|
maketext_dcp
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
Nmaketext
|
169
|
|
|
|
|
|
|
Nmaketext_p
|
170
|
|
|
|
|
|
|
Nmaketext_d
|
171
|
|
|
|
|
|
|
Nmaketext_dp
|
172
|
|
|
|
|
|
|
Nmaketext_c
|
173
|
|
|
|
|
|
|
Nmaketext_cp
|
174
|
|
|
|
|
|
|
Nmaketext_dc
|
175
|
|
|
|
|
|
|
Nmaketext_dcp
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
loc
|
178
|
|
|
|
|
|
|
loc_m
|
179
|
|
|
|
|
|
|
loc_mp
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
localise
|
182
|
|
|
|
|
|
|
localise_m
|
183
|
|
|
|
|
|
|
localise_mp
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
localize
|
186
|
|
|
|
|
|
|
localize_m
|
187
|
|
|
|
|
|
|
localize_mp
|
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Nloc
|
190
|
|
|
|
|
|
|
Nloc_m
|
191
|
|
|
|
|
|
|
Nloc_mp
|
192
|
|
|
|
|
|
|
);
|
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
our $loc_ref = do { my $loc; \$loc }; ## no critic(PackageVars)
|
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
sub import {
|
197
|
3
|
|
|
3
|
|
1230
|
my (undef, @imports) = @_;
|
198
|
|
|
|
|
|
|
|
199
|
3
|
100
|
|
|
|
9
|
if (! @imports) {
|
200
|
1
|
|
|
|
|
18
|
@imports = (
|
201
|
|
|
|
|
|
|
qw($loc_ref),
|
202
|
|
|
|
|
|
|
keys %method_name,
|
203
|
|
|
|
|
|
|
);
|
204
|
|
|
|
|
|
|
}
|
205
|
|
|
|
|
|
|
|
206
|
3
|
|
|
|
|
9
|
my $caller = caller;
|
207
|
3
|
|
|
|
|
80
|
my $package = __PACKAGE__;
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
IMPORT:
|
210
|
3
|
|
|
|
|
6
|
for my $import (@imports) {
|
211
|
173
|
100
|
|
|
|
314
|
defined $import
|
212
|
|
|
|
|
|
|
or confess 'An undefined value is not a function name';
|
213
|
172
|
100
|
|
|
|
292
|
if ($import eq '$loc_ref') { ## no critic (InterpolationOfMetachars)
|
214
|
2
|
|
|
2
|
|
11
|
no strict qw(refs); ## no critic (NoStrict)
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
215
|
2
|
|
|
2
|
|
8
|
no warnings qw(redefine); ## no critic (NoWarnings)
|
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
402
|
|
216
|
1
|
|
|
|
|
2
|
*{"$caller\::loc_ref"} = \$loc_ref;
|
|
1
|
|
|
|
|
4
|
|
217
|
1
|
|
|
|
|
3
|
next IMPORT;
|
218
|
|
|
|
|
|
|
}
|
219
|
171
|
100
|
|
|
|
270
|
exists $method_name{$import}
|
220
|
|
|
|
|
|
|
or confess qq{"$import" is not exported};
|
221
|
170
|
|
|
|
|
216
|
my $prototype = $import;
|
222
|
|
|
|
|
|
|
## no critic (ComplexRegexes)
|
223
|
170
|
100
|
|
|
|
627
|
$prototype =~ s{
|
224
|
|
|
|
|
|
|
\b N?
|
225
|
|
|
|
|
|
|
(?:
|
226
|
|
|
|
|
|
|
loc_begin_
|
227
|
|
|
|
|
|
|
| ( loc_ ) # 1
|
228
|
|
|
|
|
|
|
| __begin_
|
229
|
|
|
|
|
|
|
| ( __ ) # 2
|
230
|
|
|
|
|
|
|
| ( loc (?: ali[sz]e ) (?: _m ) ) # 3
|
231
|
|
|
|
|
|
|
| ( maketext [_]? ) # 4
|
232
|
|
|
|
|
|
|
)
|
233
|
|
|
|
|
|
|
(d)? # 5
|
234
|
|
|
|
|
|
|
(c)? # 6
|
235
|
|
|
|
|
|
|
(n)? # 7
|
236
|
|
|
|
|
|
|
(p)? # 8
|
237
|
|
|
|
|
|
|
(x)? # 9
|
238
|
|
|
|
|
|
|
\b
|
239
|
|
|
|
|
|
|
| \b N? ( locn ) \b
|
240
|
|
|
|
|
|
|
}{
|
241
|
156
|
50
|
33
|
|
|
495
|
$10
|
|
|
50
|
33
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
242
|
|
|
|
|
|
|
? (
|
243
|
|
|
|
|
|
|
( $5 ? q{$} : q{} ) # domain
|
244
|
|
|
|
|
|
|
.( $8 ? q{$} : q{} ) # context
|
245
|
|
|
|
|
|
|
.( $1 || $2 || $3 || $4 ? q{$} : q{} ) # singular
|
246
|
|
|
|
|
|
|
.( $7 ? q{$$} : q{} ) # plural, count
|
247
|
|
|
|
|
|
|
.( $6 ? q{$} : q{} ) # category
|
248
|
|
|
|
|
|
|
.( $3 ||$4 || $9 ? q{@} : q{} ) # placeholder
|
249
|
|
|
|
|
|
|
)
|
250
|
|
|
|
|
|
|
: q{@};
|
251
|
|
|
|
|
|
|
}xmse or $prototype = q{};
|
252
|
|
|
|
|
|
|
## use critic (ComplexRegexes)
|
253
|
2
|
|
|
2
|
|
12
|
no strict qw(refs); ## no critic (NoStrict)
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
254
|
2
|
|
|
2
|
|
14
|
no warnings qw(redefine); ## no critic (NoWarnings)
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
261
|
|
255
|
170
|
|
|
|
|
642
|
*{"$caller\::$import"} = set_prototype(
|
256
|
|
|
|
|
|
|
sub {
|
257
|
12
|
|
|
12
|
|
2905
|
return ${$loc_ref}->$import(@_);
|
|
12
|
|
|
|
|
56
|
|
258
|
|
|
|
|
|
|
},
|
259
|
170
|
|
|
|
|
717
|
$prototype,
|
260
|
|
|
|
|
|
|
);
|
261
|
|
|
|
|
|
|
}
|
262
|
|
|
|
|
|
|
|
263
|
1
|
|
|
|
|
89089
|
return;
|
264
|
|
|
|
|
|
|
}
|
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
1;
|
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
__END__
|