line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Eixo::Rest::Uri; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
315
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
63
|
|
4
|
3
|
|
|
3
|
|
388
|
use Eixo::Base::Clase; |
|
3
|
|
|
|
|
8611
|
|
|
3
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $REG_PARAM = qr/\:(\w+)/; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has( |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
args=>undef, |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
uri_mask=>undef, |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub build{ |
17
|
2
|
|
|
2
|
0
|
136
|
my ($self) = @_; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
5
|
my $mask = $self->uri_mask; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
8
|
my @implicit_params; |
22
|
|
|
|
|
|
|
|
23
|
2
|
|
|
|
|
4
|
my $c_mask = $mask; |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
15
|
while($mask =~ /$REG_PARAM/g){ |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my ($param_name, $param_value) = ( |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$1, |
30
|
|
|
|
|
|
|
|
31
|
4
|
|
|
|
|
9
|
$self->args->{$1} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
4
|
|
|
|
|
21
|
push @implicit_params, $1; |
36
|
|
|
|
|
|
|
|
37
|
4
|
|
|
|
|
56
|
$c_mask =~ s/\:$param_name/$param_value/g; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
2
|
|
|
|
|
9
|
return $c_mask, @implicit_params; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |