line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!perl |
2
|
|
|
|
|
|
|
#PODNAME: Raisin::Util |
3
|
|
|
|
|
|
|
#ABSTRACT: Utility subroutine for Raisin. |
4
|
|
|
|
|
|
|
|
5
|
17
|
|
|
17
|
|
69283
|
use strict; |
|
17
|
|
|
|
|
42
|
|
|
17
|
|
|
|
|
549
|
|
6
|
17
|
|
|
17
|
|
88
|
use warnings; |
|
17
|
|
|
|
|
62
|
|
|
17
|
|
|
|
|
784
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Raisin::Util; |
9
|
|
|
|
|
|
|
$Raisin::Util::VERSION = '0.92'; |
10
|
17
|
|
|
17
|
|
2749
|
use Plack::Util; |
|
17
|
|
|
|
|
61340
|
|
|
17
|
|
|
|
|
4132
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub make_tag_from_path { |
13
|
20
|
|
|
20
|
1
|
1232
|
my $path = shift; |
14
|
20
|
|
|
|
|
64
|
my @c = (split '/', $path); |
15
|
20
|
100
|
|
|
|
49
|
return 'none' unless scalar @c; |
16
|
19
|
100
|
|
|
|
124
|
$c[-2] || $c[1]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub iterate_params { |
20
|
157
|
|
|
157
|
1
|
2946
|
my $params = shift; |
21
|
157
|
|
|
|
|
197
|
my $index = 0; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
return sub { |
24
|
267
|
|
|
267
|
|
375
|
$index += 2; |
25
|
267
|
|
|
|
|
916
|
($params->[$index-2], $params->[$index-1]); |
26
|
157
|
|
|
|
|
625
|
}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |