line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::URL::AddQueryParam; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
24926
|
use 5.008008; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
86
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
77
|
|
5
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
15
|
|
|
2
|
|
|
|
|
52
|
|
6
|
2
|
|
|
2
|
|
1778
|
use URI; |
|
2
|
|
|
|
|
16264
|
|
|
2
|
|
|
|
|
55
|
|
7
|
2
|
|
|
2
|
|
2152
|
use URI::URL; |
|
2
|
|
|
|
|
18933
|
|
|
2
|
|
|
|
|
107
|
|
8
|
2
|
|
|
2
|
|
1627
|
use URI::QueryParam; |
|
2
|
|
|
|
|
1582
|
|
|
2
|
|
|
|
|
335
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
our @EXPORT_OK = qw(http_add_query_param); |
13
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub http_add_query_param |
16
|
|
|
|
|
|
|
{ |
17
|
5
|
|
|
5
|
0
|
2326
|
my $base_url = shift; |
18
|
5
|
|
|
|
|
10
|
my $hashref_add_query_param = shift; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
|
|
25
|
my $obj_url = URI::URL->new($base_url); |
21
|
5
|
|
|
|
|
10470
|
foreach (sort keys %$hashref_add_query_param) |
22
|
|
|
|
|
|
|
{ |
23
|
9
|
|
|
|
|
408
|
$obj_url->query_param_append($_, $$hashref_add_query_param{$_}); |
24
|
|
|
|
|
|
|
} |
25
|
5
|
|
|
|
|
637
|
return $obj_url->abs; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
__END__ |