| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Dancer2::Core::Route; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: Dancer2's route handler |
|
3
|
|
|
|
|
|
|
$Dancer2::Core::Route::VERSION = '2.1.0'; |
|
4
|
163
|
|
|
163
|
|
455624
|
use Moo; |
|
|
163
|
|
|
|
|
25045
|
|
|
|
163
|
|
|
|
|
1470
|
|
|
5
|
163
|
|
|
163
|
|
79361
|
use Dancer2::Core::Types; |
|
|
163
|
|
|
|
|
483
|
|
|
|
163
|
|
|
|
|
1440
|
|
|
6
|
163
|
|
|
163
|
|
2122680
|
use Module::Runtime 'use_module'; |
|
|
163
|
|
|
|
|
9068
|
|
|
|
163
|
|
|
|
|
1751
|
|
|
7
|
163
|
|
|
163
|
|
10945
|
use Carp 'croak'; |
|
|
163
|
|
|
|
|
451
|
|
|
|
163
|
|
|
|
|
14157
|
|
|
8
|
163
|
|
|
163
|
|
1322
|
use List::Util 'first'; |
|
|
163
|
|
|
|
|
559
|
|
|
|
163
|
|
|
|
|
13257
|
|
|
9
|
163
|
|
|
163
|
|
1042
|
use Scalar::Util 'blessed'; |
|
|
163
|
|
|
|
|
2856
|
|
|
|
163
|
|
|
|
|
10246
|
|
|
10
|
163
|
|
|
163
|
|
2719
|
use Ref::Util qw< is_regexpref >; |
|
|
163
|
|
|
|
|
2797
|
|
|
|
163
|
|
|
|
|
9262
|
|
|
11
|
163
|
|
|
163
|
|
98715
|
use Type::Registry; |
|
|
163
|
|
|
|
|
1866040
|
|
|
|
163
|
|
|
|
|
1995
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our ( $REQUEST, $RESPONSE, $RESPONDER, $WRITER, $ERROR_HANDLER ); |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has name => ( |
|
16
|
|
|
|
|
|
|
is => 'ro', |
|
17
|
|
|
|
|
|
|
isa => Str, |
|
18
|
|
|
|
|
|
|
predicate => 'has_name', |
|
19
|
|
|
|
|
|
|
); |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has method => ( |
|
22
|
|
|
|
|
|
|
is => 'ro', |
|
23
|
|
|
|
|
|
|
isa => Dancer2Method, |
|
24
|
|
|
|
|
|
|
required => 1, |
|
25
|
|
|
|
|
|
|
); |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has code => ( |
|
28
|
|
|
|
|
|
|
is => 'ro', |
|
29
|
|
|
|
|
|
|
required => 1, |
|
30
|
|
|
|
|
|
|
isa => CodeRef, |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has regexp => ( |
|
34
|
|
|
|
|
|
|
is => 'ro', |
|
35
|
|
|
|
|
|
|
required => 1, |
|
36
|
|
|
|
|
|
|
); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has spec_route => ( is => 'ro' ); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
has prefix => ( |
|
41
|
|
|
|
|
|
|
is => 'ro', |
|
42
|
|
|
|
|
|
|
isa => Maybe [Dancer2Prefix], |
|
43
|
|
|
|
|
|
|
predicate => 1, |
|
44
|
|
|
|
|
|
|
); |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has options => ( |
|
47
|
|
|
|
|
|
|
is => 'ro', |
|
48
|
|
|
|
|
|
|
isa => HashRef, |
|
49
|
|
|
|
|
|
|
trigger => \&_check_options, |
|
50
|
|
|
|
|
|
|
predicate => 1, |
|
51
|
|
|
|
|
|
|
); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub _check_options { |
|
54
|
8
|
|
|
8
|
|
1433
|
my ( $self, $options ) = @_; |
|
55
|
8
|
50
|
|
|
|
32
|
return 1 unless defined $options; |
|
56
|
|
|
|
|
|
|
|
|
57
|
8
|
|
|
|
|
134
|
my @supported_options = ( |
|
58
|
|
|
|
|
|
|
qw/content_type agent user_agent content_length |
|
59
|
|
|
|
|
|
|
path_info/ |
|
60
|
|
|
|
|
|
|
); |
|
61
|
8
|
|
|
|
|
18
|
for my $opt ( keys %{$options} ) { |
|
|
8
|
|
|
|
|
30
|
|
|
62
|
|
|
|
|
|
|
croak "Not a valid option for route matching: `$opt'" |
|
63
|
7
|
50
|
|
|
|
16
|
if not( grep {/^$opt$/} @supported_options ); |
|
|
35
|
|
|
|
|
196
|
|
|
64
|
|
|
|
|
|
|
} |
|
65
|
8
|
|
|
|
|
190
|
return 1; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
# private attributes |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
has _should_capture => ( |
|
71
|
|
|
|
|
|
|
is => 'ro', |
|
72
|
|
|
|
|
|
|
isa => Bool, |
|
73
|
|
|
|
|
|
|
); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
has _match_data => ( |
|
76
|
|
|
|
|
|
|
is => 'rw', |
|
77
|
|
|
|
|
|
|
isa => HashRef, |
|
78
|
|
|
|
|
|
|
); |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
has _params => ( |
|
81
|
|
|
|
|
|
|
is => 'ro', |
|
82
|
|
|
|
|
|
|
isa => ArrayRef, |
|
83
|
|
|
|
|
|
|
default => sub { [] }, |
|
84
|
|
|
|
|
|
|
); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
has _typed_params => ( |
|
87
|
|
|
|
|
|
|
is => 'ro', |
|
88
|
|
|
|
|
|
|
isa => ArrayRef, |
|
89
|
|
|
|
|
|
|
default => sub { [] }, |
|
90
|
|
|
|
|
|
|
); |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub match { |
|
93
|
1431
|
|
|
1431
|
1
|
49049
|
my ( $self, $request ) = @_; |
|
94
|
|
|
|
|
|
|
|
|
95
|
1431
|
100
|
|
|
|
5696
|
if ( $self->has_options ) { |
|
96
|
13
|
100
|
|
|
|
40
|
return unless $self->validate_options($request); |
|
97
|
|
|
|
|
|
|
} |
|
98
|
|
|
|
|
|
|
|
|
99
|
1422
|
|
|
|
|
5483
|
my @values = $request->path =~ $self->regexp; |
|
100
|
|
|
|
|
|
|
|
|
101
|
1422
|
100
|
|
|
|
7232
|
return unless @values; |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# if some named captures are found, return captures |
|
104
|
|
|
|
|
|
|
# - Note no @values implies no named captures |
|
105
|
626
|
100
|
|
|
|
5783
|
if (my %captures = %+ ) { |
|
106
|
2
|
|
|
|
|
67
|
return $self->_match_data( { captures => \%captures } ); |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
# regex comments are how we know if we captured a token, |
|
110
|
|
|
|
|
|
|
# splat or a megasplat |
|
111
|
624
|
|
|
|
|
3533
|
my @token_or_splat = |
|
112
|
|
|
|
|
|
|
$self->regexp =~ /\(\?#((?:typed_)?token|(?:mega)?splat)\)/g; |
|
113
|
|
|
|
|
|
|
|
|
114
|
624
|
100
|
|
|
|
2025
|
if (@token_or_splat) { |
|
115
|
|
|
|
|
|
|
# our named tokens |
|
116
|
86
|
|
|
|
|
202
|
my @tokens = @{ $self->_params }; |
|
|
86
|
|
|
|
|
472
|
|
|
117
|
86
|
|
|
|
|
184
|
my @typed_tokens = @{ $self->_typed_params }; |
|
|
86
|
|
|
|
|
351
|
|
|
118
|
|
|
|
|
|
|
|
|
119
|
86
|
|
|
|
|
212
|
my %params; |
|
120
|
|
|
|
|
|
|
my @splat; |
|
121
|
86
|
|
|
|
|
376
|
for ( my $i = 0; $i < @values; $i++ ) { |
|
122
|
|
|
|
|
|
|
# Is this value from a token? |
|
123
|
107
|
100
|
|
|
|
423
|
if ( defined $token_or_splat[$i] ) { |
|
124
|
106
|
100
|
|
|
|
374
|
if ( $token_or_splat[$i] eq 'typed_token' ) { |
|
125
|
13
|
|
|
|
|
22
|
my ( $token, $type ) = @{ shift @typed_tokens }; |
|
|
13
|
|
|
|
|
32
|
|
|
126
|
|
|
|
|
|
|
|
|
127
|
13
|
100
|
|
|
|
32
|
if (defined $values[$i]) { |
|
128
|
|
|
|
|
|
|
# undef value mean that token was marked as optional so |
|
129
|
|
|
|
|
|
|
# we only do type check on defined value |
|
130
|
|
|
|
|
|
|
return |
|
131
|
11
|
100
|
|
|
|
290
|
unless $type->check($values[$i]); |
|
132
|
|
|
|
|
|
|
} |
|
133
|
10
|
|
|
|
|
1766
|
$params{$token} = $values[$i]; |
|
134
|
10
|
|
|
|
|
37
|
next; |
|
135
|
|
|
|
|
|
|
} |
|
136
|
93
|
100
|
|
|
|
276
|
if ( $token_or_splat[$i] eq 'token' ) { |
|
137
|
29
|
|
|
|
|
131
|
$params{ shift @tokens } = $values[$i]; |
|
138
|
29
|
|
|
|
|
141
|
next; |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
# megasplat values are split on '/' |
|
142
|
64
|
100
|
|
|
|
239
|
if ($token_or_splat[$i] eq 'megasplat') { |
|
143
|
25
|
100
|
|
|
|
200
|
$values[$i] = [ |
|
144
|
|
|
|
|
|
|
defined $values[$i] ? split( m{/} , $values[$i], -1 ) : () |
|
145
|
|
|
|
|
|
|
]; |
|
146
|
|
|
|
|
|
|
} |
|
147
|
|
|
|
|
|
|
} |
|
148
|
65
|
|
|
|
|
293
|
push @splat, $values[$i]; |
|
149
|
|
|
|
|
|
|
} |
|
150
|
83
|
|
|
|
|
2585
|
return $self->_match_data( { |
|
151
|
|
|
|
|
|
|
%params, |
|
152
|
|
|
|
|
|
|
(splat => \@splat)x!! @splat, |
|
153
|
|
|
|
|
|
|
}); |
|
154
|
|
|
|
|
|
|
} |
|
155
|
|
|
|
|
|
|
|
|
156
|
538
|
100
|
|
|
|
2665
|
if ( $self->_should_capture ) { |
|
157
|
5
|
|
|
|
|
212
|
return $self->_match_data( { splat => \@values } ); |
|
158
|
|
|
|
|
|
|
} |
|
159
|
|
|
|
|
|
|
|
|
160
|
533
|
|
|
|
|
14266
|
return $self->_match_data( {} ); |
|
161
|
|
|
|
|
|
|
} |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
sub execute { |
|
164
|
599
|
|
|
599
|
1
|
2155
|
my ( $self, $app, @args ) = @_; |
|
165
|
599
|
|
|
|
|
2555
|
local $REQUEST = $app->request; |
|
166
|
599
|
|
|
|
|
12629
|
local $RESPONSE = $app->response; |
|
167
|
|
|
|
|
|
|
|
|
168
|
599
|
|
|
|
|
8043
|
my $content = $self->code->( $app, @args ); |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
# users may set content in the response. If the response has |
|
171
|
|
|
|
|
|
|
# content, and the returned value from the route code is not |
|
172
|
|
|
|
|
|
|
# an object (well, reference) we ignore the returned value |
|
173
|
|
|
|
|
|
|
# and use the existing content in the response instead. |
|
174
|
484
|
100
|
66
|
|
|
66631
|
$RESPONSE->has_content && !ref $content |
|
175
|
|
|
|
|
|
|
and return $app->_prep_response( $RESPONSE ); |
|
176
|
|
|
|
|
|
|
|
|
177
|
483
|
100
|
|
|
|
3477
|
my $type = blessed($content) |
|
178
|
|
|
|
|
|
|
or return $app->_prep_response( $RESPONSE, $content ); |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
# Plack::Response: proper ArrayRef-style response |
|
181
|
1
|
50
|
|
|
|
5
|
$type eq 'Plack::Response' |
|
182
|
|
|
|
|
|
|
and $RESPONSE = Dancer2::Core::Response->new_from_plack($RESPONSE); |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
# CodeRef: raw PSGI response |
|
185
|
|
|
|
|
|
|
# do we want to allow it and forward it back? |
|
186
|
|
|
|
|
|
|
# do we want to upgrade it to an asynchronous response? |
|
187
|
1
|
50
|
|
|
|
3
|
$type eq 'CODE' |
|
188
|
|
|
|
|
|
|
and die "We do not support returning code references from routes.\n"; |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
# Dancer2::Core::Response, Dancer2::Core::Response::Delayed: |
|
191
|
|
|
|
|
|
|
# proper responses |
|
192
|
1
|
50
|
|
|
|
5
|
$type eq 'Dancer2::Core::Response' |
|
193
|
|
|
|
|
|
|
and return $RESPONSE; |
|
194
|
|
|
|
|
|
|
|
|
195
|
1
|
50
|
|
|
|
7
|
$type eq 'Dancer2::Core::Response::Delayed' |
|
196
|
|
|
|
|
|
|
and return $content; |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
# we can't handle arrayref or hashref |
|
199
|
|
|
|
|
|
|
# because those might be serialized back |
|
200
|
0
|
|
|
|
|
0
|
die "Unrecognized response type from route: $type.\n"; |
|
201
|
|
|
|
|
|
|
} |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
# private subs |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
sub BUILDARGS { |
|
206
|
737
|
|
|
737
|
0
|
2288675
|
my ( $class, %args ) = @_; |
|
207
|
|
|
|
|
|
|
|
|
208
|
737
|
|
|
|
|
2420
|
my $prefix = $args{prefix}; |
|
209
|
737
|
|
|
|
|
1839
|
my $regexp = $args{regexp}; |
|
210
|
|
|
|
|
|
|
|
|
211
|
737
|
|
|
|
|
2430
|
my $type_library = delete $args{type_library}; |
|
212
|
737
|
100
|
|
|
|
4058
|
if ( $type_library) { |
|
213
|
3
|
50
|
|
|
|
5
|
eval { use_module($type_library); 1 } |
|
|
3
|
|
|
|
|
16
|
|
|
|
3
|
|
|
|
|
54593
|
|
|
214
|
|
|
|
|
|
|
or croak "type_library $type_library cannot be loaded"; |
|
215
|
|
|
|
|
|
|
} |
|
216
|
737
|
|
100
|
|
|
5200
|
$type_library ||= 'Dancer2::Core::Types'; |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
# init prefix |
|
219
|
737
|
100
|
|
|
|
4065
|
if ( $prefix ) { |
|
|
|
100
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
$args{regexp} = |
|
221
|
34
|
100
|
|
|
|
210
|
is_regexpref($regexp) ? qr{^\Q${prefix}\E${regexp}$} : |
|
222
|
|
|
|
|
|
|
$prefix . $regexp; |
|
223
|
|
|
|
|
|
|
} |
|
224
|
|
|
|
|
|
|
elsif ( !is_regexpref($regexp) ) { |
|
225
|
|
|
|
|
|
|
# No prefix, so ensure regexp begins with a '/' |
|
226
|
690
|
100
|
|
|
|
3454
|
index( $regexp, '/', 0 ) == 0 or $args{regexp} = "/$regexp"; |
|
227
|
|
|
|
|
|
|
} |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
# init regexp |
|
230
|
737
|
|
|
|
|
2106
|
$regexp = $args{regexp}; # updated value |
|
231
|
737
|
|
|
|
|
2376
|
$args{spec_route} = $regexp; |
|
232
|
|
|
|
|
|
|
|
|
233
|
737
|
100
|
|
|
|
2763
|
if ( is_regexpref($regexp)) { |
|
234
|
14
|
|
|
|
|
48
|
$args{_should_capture} = 1; |
|
235
|
|
|
|
|
|
|
} |
|
236
|
|
|
|
|
|
|
else { |
|
237
|
|
|
|
|
|
|
@args{qw/ regexp _params _typed_params _should_capture/} = |
|
238
|
723
|
|
|
|
|
2563
|
@{ _build_regexp_from_string($regexp, $type_library) }; |
|
|
723
|
|
|
|
|
2616
|
|
|
239
|
|
|
|
|
|
|
} |
|
240
|
|
|
|
|
|
|
|
|
241
|
734
|
|
|
|
|
30360
|
return \%args; |
|
242
|
|
|
|
|
|
|
} |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub _build_regexp_from_string { |
|
245
|
723
|
|
|
723
|
|
2337
|
my ($string, $type_library) = @_; |
|
246
|
|
|
|
|
|
|
|
|
247
|
723
|
|
|
|
|
1695
|
my $capture = 0; |
|
248
|
723
|
|
|
|
|
1487
|
my ( @params, @typed_params ); |
|
249
|
|
|
|
|
|
|
|
|
250
|
723
|
|
|
|
|
4830
|
my $type_registry = Type::Registry->new; |
|
251
|
723
|
|
|
|
|
8835
|
$type_registry->add_types($type_library); |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
# look for route with tokens [aka params] (/hello/:foo) |
|
254
|
723
|
100
|
|
|
|
9625140
|
if ( $string =~ /:/ ) { |
|
255
|
60
|
|
|
|
|
474
|
my @found = $string =~ m|:([^/.\?]+)|g; |
|
256
|
60
|
|
|
|
|
187
|
foreach my $token ( @found ) { |
|
257
|
68
|
100
|
|
|
|
321
|
if ( $token =~ s/\[(.+)\]$// ) { |
|
258
|
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
# typed token |
|
260
|
17
|
|
|
|
|
89
|
my $type = $type_registry->lookup($1); |
|
261
|
16
|
|
|
|
|
9342
|
push @typed_params, [ $token, $type ]; |
|
262
|
|
|
|
|
|
|
} |
|
263
|
|
|
|
|
|
|
else { |
|
264
|
51
|
|
|
|
|
193
|
push @params, $token; |
|
265
|
|
|
|
|
|
|
} |
|
266
|
|
|
|
|
|
|
} |
|
267
|
59
|
100
|
|
|
|
247
|
if (@typed_params) { |
|
268
|
15
|
|
|
|
|
96
|
$string =~ s!(:[^/.\?]+\[[^/.\?]+\])!(?#typed_token)([^/]+)!g; |
|
269
|
15
|
|
|
|
|
31
|
$capture = 1; |
|
270
|
|
|
|
|
|
|
} |
|
271
|
59
|
100
|
|
|
|
208
|
if (@params) { |
|
272
|
51
|
|
|
51
|
|
485
|
first { $_ eq 'splat' } @params |
|
273
|
47
|
100
|
|
|
|
568
|
and croak q{Named placeholder 'splat' is deprecated}; |
|
274
|
|
|
|
|
|
|
|
|
275
|
50
|
|
|
50
|
|
729
|
first { $_ eq 'captures' } @params |
|
276
|
46
|
100
|
|
|
|
330
|
and croak q{Named placeholder 'captures' is deprecated}; |
|
277
|
|
|
|
|
|
|
|
|
278
|
45
|
|
|
|
|
330
|
$string =~ s!(:[^\/\.\?]+)!(?#token)([^/]+)!g; |
|
279
|
45
|
|
|
|
|
156
|
$capture = 1; |
|
280
|
|
|
|
|
|
|
} |
|
281
|
|
|
|
|
|
|
} |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# parse megasplat |
|
284
|
|
|
|
|
|
|
# we use {0,} instead of '*' not to fall in the splat rule |
|
285
|
|
|
|
|
|
|
# same logic for [^\n] instead of '.' |
|
286
|
720
|
100
|
|
|
|
3892
|
$capture = 1 if $string =~ s!\Q**\E!(?#megasplat)([^\n]+)!g; |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
# parse wildcards |
|
289
|
720
|
100
|
|
|
|
2847
|
$capture = 1 if $string =~ s!\*!(?#splat)([^/]+)!g; |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
# escape dots |
|
292
|
720
|
100
|
|
|
|
2837
|
$string =~ s/\./\\\./g if $string =~ /\./; |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
# escape slashes |
|
295
|
720
|
|
|
|
|
3735
|
$string =~ s/\//\\\//g; |
|
296
|
|
|
|
|
|
|
|
|
297
|
720
|
|
|
|
|
14734
|
return [ "^$string\$", \@params, \@typed_params, $capture ]; |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
sub validate_options { |
|
301
|
13
|
|
|
13
|
0
|
27
|
my ( $self, $request ) = @_; |
|
302
|
|
|
|
|
|
|
|
|
303
|
13
|
|
|
|
|
20
|
for my $option ( keys %{ $self->options } ) { |
|
|
13
|
|
|
|
|
49
|
|
|
304
|
|
|
|
|
|
|
return 0 |
|
305
|
|
|
|
|
|
|
if ( |
|
306
|
|
|
|
|
|
|
( not $request->$option ) |
|
307
|
12
|
100
|
100
|
|
|
54
|
|| ( $request->$option !~ $self->options->{ $option } ) |
|
308
|
|
|
|
|
|
|
) |
|
309
|
|
|
|
|
|
|
} |
|
310
|
4
|
|
|
|
|
555
|
return 1; |
|
311
|
|
|
|
|
|
|
} |
|
312
|
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
1; |
|
314
|
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
__END__ |