| 1 | #!perl | ||||||||||
| 2 | #PODNAME: Raisin::Util | ||||||||||
| 3 | #ABSTRACT: Utility subroutine for Raisin. | ||||||||||
| 4 | |||||||||||
| 5 | 23 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 23 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | package Raisin::Util; | ||||||||||
| 9 | 23 | $Raisin::Util::VERSION = '0.94'; | |||||||||
| 10 | 23 | ▶ | use Plack::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 20 | ▶ | sub make_tag_from_path { | ||||||||
|
Subroutine
make_tag_from_path: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 13 | 20 | my $path = shift; | |||||||||
| 14 | 20 | my @c = (split '/', $path); | |||||||||
| 15 | 20 | ▶ | return 'none' unless scalar @c; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 19 | ▶ | $c[-2] || $c[1]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 157 | ▶ | sub iterate_params { | ||||||||
|
Subroutine
iterate_params: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 20 | 157 | my $params = shift; | |||||||||
| 21 | 157 | my $index = 0; | |||||||||
| 22 | |||||||||||
| 23 | 267 | ▶ | return sub { | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 267 | $index += 2; | |||||||||
| 25 | 267 | ($params->[$index-2], $params->[$index-1]); | |||||||||
| 26 | 157 | }; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 23 | 1; | |||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||