projects
/
liburi-template-perl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported upstream version 0.08.01
[liburi-template-perl.git]
/
lib
/
URI
/
Template.pm
diff --git
a/lib/URI/Template.pm
b/lib/URI/Template.pm
index
47cfb2b
..
4f5cbfc
100644
(file)
--- a/
lib/URI/Template.pm
+++ b/
lib/URI/Template.pm
@@
-3,12
+3,14
@@
package URI::Template;
use strict;
use warnings;
use strict;
use warnings;
-our $VERSION = '0.0
7
';
+our $VERSION = '0.0
8_01
';
use URI;
use URI::Escape ();
use overload '""' => \&as_string;
use URI;
use URI::Escape ();
use overload '""' => \&as_string;
+my $unsafe = q(^A-Za-z0-9\-_.~!\$\&'()*+,;=:/?\[\]#@);
+
=head1 NAME
URI::Template - Object for handling URI templates
=head1 NAME
URI::Template - Object for handling URI templates
@@
-26,7
+28,7
@@
URI::Template - Object for handling URI templates
=head1 DESCRIPTION
This is an initial attempt to provide a wrapper around URI templates
=head1 DESCRIPTION
This is an initial attempt to provide a wrapper around URI templates
-as described at http://www.ietf.org/internet-drafts/draft-gregorio-uritemplate-0
0
.txt
+as described at http://www.ietf.org/internet-drafts/draft-gregorio-uritemplate-0
1
.txt
=head1 INSTALLATION
=head1 INSTALLATION
@@
-138,7
+140,7
@@
sub _process_by_key {
# fix undef vals
for my $var ( @vars ) {
$params{ $var } = defined $params{ $var }
# fix undef vals
for my $var ( @vars ) {
$params{ $var } = defined $params{ $var }
- ? URI::Escape::uri_escape( $params{ $var } )
+ ? URI::Escape::uri_escape( $params{ $var }
, $unsafe
)
: '';
}
: '';
}
@@
-156,7
+158,7
@@
sub _process_by_position {
$uri =~ s/{(.+?)}/@params
? defined $params[ 0 ]
$uri =~ s/{(.+?)}/@params
? defined $params[ 0 ]
- ? URI::Escape::uri_escape( shift @params )
+ ? URI::Escape::uri_escape( shift @params
, $unsafe
)
: ''
: ''/eg;
: ''
: ''/eg;