-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathEncode.pm
More file actions
41 lines (32 loc) · 875 Bytes
/
Copy pathEncode.pm
File metadata and controls
41 lines (32 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package URL::Encode;
use strict;
use warnings;
BEGIN {
our $VERSION = '0.03';
our @EXPORT_OK = qw[ url_encode
url_encode_utf8
url_decode
url_decode_utf8
url_params_each
url_params_flat
url_params_mixed
url_params_multi ];
our %EXPORT_TAGS = ( all => \@EXPORT_OK );
my $use_pp = $ENV{URL_ENCODE_PP};
if (!$use_pp) {
eval {
require URL::Encode::XS; URL::Encode::XS->VERSION('0.03');
};
$use_pp = !!$@;
}
if ($use_pp) {
require URL::Encode::PP;
URL::Encode::PP->import(@EXPORT_OK);
}
else {
URL::Encode::XS->import(@EXPORT_OK);
}
require Exporter;
*import = \&Exporter::import;
}
1;