line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Petal::Utils::UriEscape; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
111
|
|
4
|
3
|
|
|
3
|
|
16
|
use warnings::register; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
382
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
19
|
use Carp; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
240
|
|
7
|
3
|
|
|
3
|
|
3613
|
use URI::Escape qw( &uri_escape ); |
|
3
|
|
|
|
|
4743
|
|
|
3
|
|
|
|
|
448
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
19
|
use base qw( Petal::Utils::Base ); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
1198
|
|
10
|
|
|
|
|
|
|
|
11
|
3
|
|
|
3
|
|
18
|
use constant name => 'uri_escape'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
199
|
|
12
|
3
|
|
|
3
|
|
26
|
use constant aliases => qw(); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
529
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = ((require Petal::Utils), $Petal::Utils::VERSION)[1]; |
15
|
|
|
|
|
|
|
our $REVISION = (split(/ /, ' $Revision: 1.1 $ '))[2]; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub process { |
18
|
7
|
|
|
7
|
0
|
13648
|
my $self = shift; |
19
|
7
|
|
|
|
|
8
|
my $hash = shift; |
20
|
7
|
|
33
|
|
|
19
|
my $args = shift || confess( "'uri_escape' expects a variable (got nothing)" ); |
21
|
7
|
|
|
|
|
20
|
my $result = $hash->fetch( $args ); |
22
|
7
|
50
|
|
|
|
455
|
return unless length( $result ); # do nothing if $args evaluates to nothing |
23
|
7
|
|
|
|
|
19
|
return uri_escape( $result ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |