line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!perl |
2
|
|
|
|
|
|
|
#PODNAME: Raisin::Util |
3
|
|
|
|
|
|
|
#ABSTRACT: Utility subroutine for Raisin. |
4
|
|
|
|
|
|
|
|
5
|
17
|
|
|
17
|
|
57025
|
use strict; |
|
17
|
|
|
|
|
39
|
|
|
17
|
|
|
|
|
424
|
|
6
|
17
|
|
|
17
|
|
71
|
use warnings; |
|
17
|
|
|
|
|
1182
|
|
|
17
|
|
|
|
|
677
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Raisin::Util; |
9
|
|
|
|
|
|
|
$Raisin::Util::VERSION = '0.94'; |
10
|
17
|
|
|
17
|
|
2070
|
use Plack::Util; |
|
17
|
|
|
|
|
48282
|
|
|
17
|
|
|
|
|
2333
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub make_tag_from_path { |
13
|
20
|
|
|
20
|
1
|
980
|
my $path = shift; |
14
|
20
|
|
|
|
|
85
|
my @c = (split '/', $path); |
15
|
20
|
100
|
|
|
|
46
|
return 'none' unless scalar @c; |
16
|
19
|
100
|
|
|
|
116
|
$c[-2] || $c[1]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub iterate_params { |
20
|
157
|
|
|
157
|
1
|
2355
|
my $params = shift; |
21
|
157
|
|
|
|
|
209
|
my $index = 0; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
return sub { |
24
|
267
|
|
|
267
|
|
299
|
$index += 2; |
25
|
267
|
|
|
|
|
746
|
($params->[$index-2], $params->[$index-1]); |
26
|
157
|
|
|
|
|
505
|
}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |