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.13
[liburi-template-perl.git]
/
lib
/
URI
/
Template.pm
diff --git
a/lib/URI/Template.pm
b/lib/URI/Template.pm
index
c7f45a2
..
b3c1231
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
2
';
+our $VERSION = '0.1
3
';
use URI;
use URI::Escape ();
use URI;
use URI::Escape ();
@@
-172,9
+172,7
@@
sub deparse {
my $templ = $self->as_string;
$self->{ vars_list } = [ $templ =~ /{(.+?)}/g ];
$templ =~ s/{.+?}/(.+?)/g;
my $templ = $self->as_string;
$self->{ vars_list } = [ $templ =~ /{(.+?)}/g ];
$templ =~ s/{.+?}/(.+?)/g;
- # If the template ends w/ a match, then make it greedy.
- $templ =~ s/\Q(.+?)\E$/(.+)/;
- $self->{ deparse_re } = qr/$templ/;
+ $self->{ deparse_re } = qr/^${templ}$/;
}
my @matches = $uri =~ $self->{ deparse_re };
}
my @matches = $uri =~ $self->{ deparse_re };