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.18
[liburi-template-perl.git]
/
lib
/
URI
/
Template.pm
diff --git
a/lib/URI/Template.pm
b/lib/URI/Template.pm
index
390f6a6
..
54a73ac
100644
(file)
--- a/
lib/URI/Template.pm
+++ b/
lib/URI/Template.pm
@@
-3,7
+3,7
@@
package URI::Template;
use strict;
use warnings;
use strict;
use warnings;
-our $VERSION = '0.1
7
';
+our $VERSION = '0.1
8
';
use URI;
use URI::Escape ();
use URI;
use URI::Escape ();
@@
-123,10
+123,7
@@
sub _tostring_query {
$join = '&' if $exp->{ op } =~ /[?&]/;
if ( ref $value eq 'ARRAY' ) {
$join = '&' if $exp->{ op } =~ /[?&]/;
if ( ref $value eq 'ARRAY' ) {
- if( !@$value ) {
- return if $var->{ explode };
- return $var->{ name } . '=';
- }
+ return if !@$value;
if ( $var->{ explode } ) {
return join( $join,
map { $var->{ name } . '=' . _quote( $_, $safe ) } @$value );
if ( $var->{ explode } ) {
return join( $join,
map { $var->{ name } . '=' . _quote( $_, $safe ) } @$value );
@@
-137,10
+134,7
@@
sub _tostring_query {
}
}
elsif ( ref $value eq 'HASH' ) {
}
}
elsif ( ref $value eq 'HASH' ) {
- if( !keys %$value ) {
- return if $var->{ explode };
- return $var->{ name } . '=';
- }
+ return if !keys %$value;
if ( $var->{ explode } ) {
return join(
$join,
if ( $var->{ explode } ) {
return join(
$join,
@@
-341,7
+335,7
@@
URI::Template - Object for handling URI templates (RFC 6570)
=head1 DESCRIPTION
This module provides a wrapper around URI templates as described in RFC 6570:
=head1 DESCRIPTION
This module provides a wrapper around URI templates as described in RFC 6570:
-http://tools.ietf.org/html/rfc6570
+L<< http://tools.ietf.org/html/rfc6570 >>.
=head1 INSTALLATION
=head1 INSTALLATION