line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Yandex::Dictionary; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
132542
|
use strict; |
|
8
|
|
|
|
|
25
|
|
|
8
|
|
|
|
|
232
|
|
4
|
8
|
|
|
8
|
|
44
|
use warnings; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
226
|
|
5
|
8
|
|
|
8
|
|
4248
|
use utf8; |
|
8
|
|
|
|
|
120
|
|
|
8
|
|
|
|
|
44
|
|
6
|
|
|
|
|
|
|
|
7
|
8
|
|
|
8
|
|
3842
|
use HTML::Entities qw{encode_entities}; |
|
8
|
|
|
|
|
51229
|
|
|
8
|
|
|
|
|
739
|
|
8
|
8
|
|
|
8
|
|
5830
|
use HTTP::Tiny; |
|
8
|
|
|
|
|
336855
|
|
|
8
|
|
|
|
|
325
|
|
9
|
8
|
|
|
8
|
|
4740
|
use JSON; |
|
8
|
|
|
|
|
84777
|
|
|
8
|
|
|
|
|
44
|
|
10
|
8
|
|
|
8
|
|
1045
|
use POSIX qw{:locale_h}; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
65
|
|
11
|
8
|
|
|
8
|
|
4124
|
use URI::Escape qw{uri_escape_utf8}; |
|
8
|
|
|
|
|
8851
|
|
|
8
|
|
|
|
|
13856
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my |
14
|
|
|
|
|
|
|
$VERSION = '0.02'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my %valid_lang = map { $_ => 1 } qw{ |
17
|
|
|
|
|
|
|
be-be be-ru bg-ru cs-en cs-ru da-en da-ru de-de de-en |
18
|
|
|
|
|
|
|
de-ru de-tr el-en el-ru en-cs en-da en-de en-el en-en |
19
|
|
|
|
|
|
|
en-es en-et en-fi en-fr en-it en-lt en-lv en-nl en-no |
20
|
|
|
|
|
|
|
en-pt en-ru en-sk en-sv en-tr en-uk es-en es-es es-ru |
21
|
|
|
|
|
|
|
et-en et-ru fi-en fi-fi fi-ru fr-en fr-fr fr-ru hu-hu |
22
|
|
|
|
|
|
|
hu-ru it-en it-it it-ru lt-en lt-lt lt-ru lv-en lv-ru |
23
|
|
|
|
|
|
|
mhr-ru mrj-ru nl-en nl-ru no-en no-ru pl-ru pt-en pt-ru |
24
|
|
|
|
|
|
|
ru-be ru-bg ru-cs ru-da ru-de ru-el ru-en ru-es ru-et |
25
|
|
|
|
|
|
|
ru-fi ru-fr ru-hu ru-it ru-lt ru-lv ru-mhr ru-mrj ru-nl |
26
|
|
|
|
|
|
|
ru-no ru-pl ru-pt ru-ru ru-sk ru-sv ru-tr ru-tt ru-uk |
27
|
|
|
|
|
|
|
sk-en sk-ru sv-en sv-ru tr-de tr-en tr-ru tt-ru uk-en |
28
|
|
|
|
|
|
|
uk-ru uk-uk |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my %valid_default_ui = map { $_ => 1 } qw{ en ru tr }; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my %valid_format = map { $_ => 1 } qw{ json xml }; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $default_format = 'json'; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $james_axl_result = sub |
38
|
|
|
|
|
|
|
{ |
39
|
|
|
|
|
|
|
my $self = shift; |
40
|
|
|
|
|
|
|
die "You must set API key\n" if (not defined $self->{ _key_ }); |
41
|
|
|
|
|
|
|
die "You must set Text\n" if (not defined $self->{ _text_ }); |
42
|
|
|
|
|
|
|
my $query = '/lookup?'; |
43
|
|
|
|
|
|
|
my $post = 'key='.$self->{ _key_ }.'&text='.$self->{ _text_ }.'&lang='.$self->{_lang_}.'&ui='.$self->{_ui_}; |
44
|
|
|
|
|
|
|
my $response = $self->{_http_}->get($self->{_base_} . '.json' . $query . $post); |
45
|
|
|
|
|
|
|
die "Invalid API key.\n" if ($response->{status} eq '401'); |
46
|
|
|
|
|
|
|
die "Blocked API key.\n" if ($response->{status} eq '402'); |
47
|
|
|
|
|
|
|
die "Exceeded the daily limit on the number of requests.\n" if ($response->{status} eq '403'); |
48
|
|
|
|
|
|
|
die "The text size exceeds the maximum.\n" if ($response->{status} eq '413'); |
49
|
|
|
|
|
|
|
die "The specified translation direction is not supported.\n" if ($response->{status} eq '501'); |
50
|
|
|
|
|
|
|
die "Failed to get list of supported languages! (response code $response->{status})\n" unless ($response->{success}); |
51
|
|
|
|
|
|
|
if (defined wantarray && length $response->{content}) { |
52
|
|
|
|
|
|
|
my $json_respond = JSON->new->utf8->decode($response->{content}); |
53
|
|
|
|
|
|
|
return $json_respond->{def}; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
}; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# |
58
|
|
|
|
|
|
|
## Set the default UI to Russian if the locale is Russian; |
59
|
|
|
|
|
|
|
## Set the default UI to Turkish if the locale is Turkish; |
60
|
|
|
|
|
|
|
## otherwise, set it to English. |
61
|
|
|
|
|
|
|
## |
62
|
|
|
|
|
|
|
# |
63
|
|
|
|
|
|
|
(my $default_ui = setlocale(LC_CTYPE) || 'en') =~ s/_.*$//; |
64
|
|
|
|
|
|
|
$default_ui = 'en' if (!exists $valid_default_ui{$default_ui}); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub new |
67
|
|
|
|
|
|
|
{ |
68
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
69
|
0
|
|
0
|
|
|
|
my $self = { |
|
|
|
0
|
|
|
|
|
70
|
|
|
|
|
|
|
_key_ => shift, |
71
|
|
|
|
|
|
|
_text_ => shift, |
72
|
|
|
|
|
|
|
_lang_ => shift, |
73
|
|
|
|
|
|
|
_ui_ => shift || $default_ui, |
74
|
|
|
|
|
|
|
_format_ => shift || $default_format, |
75
|
|
|
|
|
|
|
_base_ => 'https://dictionary.yandex.net/api/v1/dicservice' , |
76
|
|
|
|
|
|
|
_http_ => HTTP::Tiny->new, |
77
|
|
|
|
|
|
|
}; |
78
|
|
|
|
|
|
|
|
79
|
0
|
0
|
|
|
|
|
$self->{_text_} = uri_escape_utf8($self->{_text_}) if (defined $self->{_text_}); |
80
|
0
|
|
|
|
|
|
return bless $self, $class; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub set_key |
84
|
|
|
|
|
|
|
{ |
85
|
0
|
|
|
0
|
1
|
|
my ($self,$key) = @_; |
86
|
0
|
0
|
|
|
|
|
$self->{_key_} = $key if (defined $key); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub set_text |
90
|
|
|
|
|
|
|
{ |
91
|
0
|
|
|
0
|
1
|
|
my ($self,$test) = @_; |
92
|
0
|
0
|
|
|
|
|
$self->{_text_} = $test if (defined $test); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub set_lang |
96
|
|
|
|
|
|
|
{ |
97
|
0
|
|
|
0
|
1
|
|
my ($self,$lang) = @_; |
98
|
0
|
0
|
0
|
|
|
|
$self->{_lang_} = $lang if (defined $lang && exists $valid_lang{$lang}); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub set_format |
102
|
|
|
|
|
|
|
{ |
103
|
0
|
|
|
0
|
1
|
|
my ($self,$format) = @_; |
104
|
0
|
0
|
0
|
|
|
|
$self->{_format_} = (defined $format && exists $valid_format{$format}) ? $format : $default_format; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub set_ui |
108
|
|
|
|
|
|
|
{ |
109
|
0
|
|
|
0
|
1
|
|
my ($self,$ui) = @_; |
110
|
0
|
0
|
0
|
|
|
|
$self->{_ui_} = (defined $ui && exists $valid_default_ui{$ui}) ? $ui : $default_ui; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub set_default_ui |
114
|
|
|
|
|
|
|
{ |
115
|
0
|
|
|
0
|
1
|
|
my ($self,$this_default_ui) = @_; |
116
|
0
|
0
|
0
|
|
|
|
$default_ui = $this_default_ui if (defined $this_default_ui && exists $valid_default_ui{$this_default_ui}); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub get_langs_list |
120
|
|
|
|
|
|
|
{ |
121
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
122
|
0
|
0
|
|
|
|
|
die "You must set API key\n" if (not defined $self->{ _key_ }); |
123
|
0
|
|
|
|
|
|
my $query = '/getLangs?'; |
124
|
0
|
|
|
|
|
|
my $post = 'key='.$self->{_key_}.'&ui='.$self->{_ui_}; |
125
|
0
|
0
|
0
|
|
|
|
$self->{_format_} = (defined $self->{_format_} && exists $valid_format{$self->{_format_}}) ? $self->{_format_} :$default_format; |
126
|
0
|
0
|
|
|
|
|
my $format = ($self->{_format_} eq 'xml') ? '' : '.json'; |
127
|
0
|
|
|
|
|
|
my $response = $self->{_http_}->get($self->{_base_} . $format . $query . $post); |
128
|
|
|
|
|
|
|
|
129
|
0
|
0
|
|
|
|
|
die "Invalid API key\n" if ($response->{status} eq '401'); |
130
|
0
|
0
|
|
|
|
|
die "Blocked API key\n" if ($response->{status} eq '402'); |
131
|
0
|
0
|
|
|
|
|
die "Failed to get list of supported languages! (response code $response->{status})\n" unless ($response->{success}); |
132
|
|
|
|
|
|
|
|
133
|
0
|
0
|
|
|
|
|
if (length $response->{content}) { |
134
|
0
|
|
|
|
|
|
return $response->{content}; |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub james_axl_langs_list |
139
|
|
|
|
|
|
|
{ |
140
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
141
|
0
|
0
|
|
|
|
|
die "You must set API key\n" if (not defined $self->{ _key_ }); |
142
|
0
|
0
|
|
|
|
|
die "You must set Text\n" if (not defined $self->{ _text_ }); |
143
|
0
|
|
|
|
|
|
my $query = '/getLangs?'; |
144
|
0
|
|
|
|
|
|
my $post = 'key='.$self->{_key_}.'&ui='.$self->{_ui_}; |
145
|
0
|
|
|
|
|
|
my $response = $self->{_http_}->get($self->{_base_} .'.json' . $query . $post); |
146
|
0
|
0
|
|
|
|
|
die "Invalid API key\n" if ($response->{status} eq '401'); |
147
|
0
|
0
|
|
|
|
|
die "Blocked API key\n" if ($response->{status} eq '402'); |
148
|
0
|
0
|
|
|
|
|
die "Failed to get list of supported languages! (response code $response->{status})\n" unless ($response->{success}); |
149
|
0
|
0
|
0
|
|
|
|
if (defined wantarray && length $response->{content}) { |
150
|
0
|
|
|
|
|
|
my $json_respond = JSON->new->utf8->decode($response->{content}); |
151
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $json_respond } : scalar(@{ $json_respond }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
} |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub get_result |
156
|
|
|
|
|
|
|
{ |
157
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
158
|
0
|
0
|
|
|
|
|
die "You must set API key\n" if (not defined $self->{ _key_ }); |
159
|
0
|
0
|
|
|
|
|
die "You must set Text\n" if (not defined $self->{ _text_ }); |
160
|
0
|
|
|
|
|
|
my $query = '/lookup?'; |
161
|
0
|
|
|
|
|
|
my $post = 'key='.$self->{ _key_ }.'&text='.$self->{ _text_ }.'&lang='.$self->{_lang_}.'&ui='.$self->{_ui_}; |
162
|
0
|
0
|
0
|
|
|
|
$self->{_format_} = $default_format if (defined $self->{_format_} && !exists $valid_format{$self->{_format_}}); |
163
|
0
|
0
|
|
|
|
|
my $format = ($self->{_format_} eq 'xml') ? '' : '.json'; |
164
|
0
|
|
|
|
|
|
my $response = $self->{_http_}->get($self->{_base_} . $format . $query . $post); |
165
|
0
|
0
|
|
|
|
|
die "Invalid API key.\n" if ($response->{status} eq '401'); |
166
|
0
|
0
|
|
|
|
|
die "Blocked API key.\n" if ($response->{status} eq '402'); |
167
|
0
|
0
|
|
|
|
|
die "Exceeded the daily limit on the number of requests.\n" if ($response->{status} eq '403'); |
168
|
0
|
0
|
|
|
|
|
die "The text size exceeds the maximum.\n" if ($response->{status} eq '413'); |
169
|
0
|
0
|
|
|
|
|
die "The specified translation direction is not supported.\n" if ($response->{status} eq '501'); |
170
|
0
|
0
|
|
|
|
|
die "Failed to get list of supported languages! (response code $response->{status})\n" unless ($response->{success}); |
171
|
0
|
0
|
|
|
|
|
if (length $response->{content}) { |
172
|
0
|
|
|
|
|
|
return $response->{content}; |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub get_input_text_pos_ts |
177
|
|
|
|
|
|
|
{ |
178
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
179
|
0
|
|
|
|
|
|
my $respond = $self->$james_axl_result(); |
180
|
0
|
|
|
|
|
|
my $index = undef; |
181
|
0
|
|
|
|
|
|
my $result = []; |
182
|
0
|
|
|
|
|
|
for ($index = 0; $index < scalar @{$respond} ; $index+=1){ |
|
0
|
|
|
|
|
|
|
183
|
0
|
|
|
|
|
|
push @{$result}, { |
184
|
0
|
|
|
|
|
|
'text' => ${$respond}[$index]->{text}, |
185
|
0
|
|
|
|
|
|
'pos' => ${$respond}[$index]->{pos}, |
186
|
0
|
|
|
|
|
|
'ts' => ${$respond}[$index]->{ts} |
187
|
0
|
|
|
|
|
|
}; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $result } : scalar(@{ $result }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# In English does not have 'gen' |
194
|
|
|
|
|
|
|
sub get_result_tr_pos_gen |
195
|
|
|
|
|
|
|
{ |
196
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
197
|
0
|
|
|
|
|
|
my $respond = $self->$james_axl_result(); |
198
|
0
|
|
|
|
|
|
my ($x,$y,$result) = (undef, undef, []); |
199
|
|
|
|
|
|
|
|
200
|
0
|
|
|
|
|
|
for ($x = 0; $x < scalar @{$respond} ; $x+=1){ |
|
0
|
|
|
|
|
|
|
201
|
0
|
|
|
|
|
|
for ($y = 0; $y < scalar @{$respond->[$x]->{tr}} ; $y+=1) { |
|
0
|
|
|
|
|
|
|
202
|
0
|
|
|
|
|
|
push @{$result}, { |
203
|
0
|
|
|
|
|
|
'text' => ${$respond}[$x]->{tr}[$y]->{text}, |
204
|
0
|
|
|
|
|
|
'pos' => ${$respond}[$x]->{tr}[$y]->{pos}, |
205
|
0
|
|
|
|
|
|
'gen' => ${$respond}[$x]->{tr}[$y]->{gen} |
206
|
0
|
|
|
|
|
|
}; |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
|
210
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $result } : scalar(@{ $result }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
} |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
sub get_result_mean |
214
|
|
|
|
|
|
|
{ |
215
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
216
|
0
|
|
|
|
|
|
my $respond = $self->$james_axl_result(); |
217
|
0
|
|
|
|
|
|
my ($x,$y,$z,$result) = (undef, undef, undef ,[]); |
218
|
0
|
|
|
|
|
|
for ($x = 0; $x < scalar @{$respond} ; $x+=1){ |
|
0
|
|
|
|
|
|
|
219
|
0
|
|
|
|
|
|
for ($y = 0; $y < scalar @{$respond->[$x]->{tr}} ; $y+=1) { |
|
0
|
|
|
|
|
|
|
220
|
0
|
0
|
|
|
|
|
if (defined ${$respond}[$x]->{tr}[$y]->{mean}[0]->{text}){ |
|
0
|
|
|
|
|
|
|
221
|
0
|
|
|
|
|
|
for ($z = 0; $z < scalar @{$respond->[$x]->{tr}->[$y]->{mean}} ; $z+=1) { |
|
0
|
|
|
|
|
|
|
222
|
0
|
|
|
|
|
|
push @{$result}, ${$respond}[$x]->{tr}[$y]->{mean}[$z]->{text}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $result } : scalar(@{ $result }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub get_result_syn |
232
|
|
|
|
|
|
|
{ |
233
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
234
|
0
|
|
|
|
|
|
my $respond = $self->$james_axl_result(); |
235
|
0
|
|
|
|
|
|
my ($x,$y,$z,$result) = (undef, undef, undef ,[]); |
236
|
0
|
|
|
|
|
|
for ($x = 0; $x < scalar @{$respond} ; $x+=1){ |
|
0
|
|
|
|
|
|
|
237
|
0
|
|
|
|
|
|
for ($y = 0; $y < scalar @{$respond->[$x]->{tr}} ; $y+=1) { |
|
0
|
|
|
|
|
|
|
238
|
0
|
0
|
|
|
|
|
if (defined ${$respond}[$x]->{tr}[$y]->{syn}[0]->{text}){ |
|
0
|
|
|
|
|
|
|
239
|
0
|
|
|
|
|
|
for ($z = 0; $z < scalar @{$respond->[$x]->{tr}->[$y]->{syn}} ; $z+=1) { |
|
0
|
|
|
|
|
|
|
240
|
0
|
|
|
|
|
|
push @{$result}, { |
241
|
0
|
|
|
|
|
|
'text' => ${$respond}[$x]->{tr}[$y]->{syn}[$z]->{text}, |
242
|
0
|
|
|
|
|
|
'pos' => ${$respond}[$x]->{tr}[$y]->{syn}[$z]->{pos}, |
243
|
0
|
|
|
|
|
|
'gen' => ${$respond}[$x]->{tr}[$y]->{syn}[$z]->{gen} |
244
|
|
|
|
|
|
|
} |
245
|
0
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
} |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $result } : scalar(@{ $result }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
sub get_result_eg |
254
|
|
|
|
|
|
|
{ |
255
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
256
|
0
|
|
|
|
|
|
my $respond = $self->$james_axl_result(); |
257
|
0
|
|
|
|
|
|
my ($x,$y,$z,$result) = (undef, undef, undef ,[]); |
258
|
0
|
|
|
|
|
|
for ($x = 0; $x < scalar @{$respond} ; $x+=1){ |
|
0
|
|
|
|
|
|
|
259
|
0
|
|
|
|
|
|
for ($y = 0; $y < scalar @{$respond->[$x]->{tr}} ; $y+=1) { |
|
0
|
|
|
|
|
|
|
260
|
0
|
0
|
|
|
|
|
if (defined ${$respond}[$x]->{tr}[$y]->{ex}[0]->{text}){ |
|
0
|
|
|
|
|
|
|
261
|
0
|
|
|
|
|
|
for ($z = 0; $z < scalar @{$respond->[$x]->{tr}->[$y]->{ex}} ; $z+=1) { |
|
0
|
|
|
|
|
|
|
262
|
0
|
|
|
|
|
|
push @{$result}, { |
263
|
0
|
|
|
|
|
|
'text' => ${$respond}[$x]->{tr}[$y]->{ex}[$z]->{text}, |
264
|
0
|
|
|
|
|
|
'tr' => ${$respond}[$x]->{tr}[$y]->{ex}[$z]->{tr}[0]->{text} |
265
|
|
|
|
|
|
|
} |
266
|
0
|
|
|
|
|
|
} |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
0
|
0
|
|
|
|
|
return (wantarray) ? @{ $result } : scalar(@{ $result }); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
1; |
275
|
|
|
|
|
|
|
__END__ |