diff -Nru liburi-template-perl-0.22/Changes liburi-template-perl-0.24/Changes --- liburi-template-perl-0.22/Changes 2015-04-04 17:29:01.000000000 +0000 +++ liburi-template-perl-0.24/Changes 2018-09-20 17:53:48.000000000 +0000 @@ -1,5 +1,14 @@ Revision history for Perl extension URI::Template +0.24 2018-09-20 + - add exported functions template_process and template_process_string + for simple usage (GH #9) + +0.23 2018-07-10 + - Fix Makefile.PL with no '.' in @INC (GH #5, RT #121036) + - Ensure we don't re-encode pre-encoded values for +var and #var + (GH #7, GH #8) + 0.22 2015-04-04 - Fix regression in variables() when called in list context (GH #4) diff -Nru liburi-template-perl-0.22/debian/changelog liburi-template-perl-0.24/debian/changelog --- liburi-template-perl-0.22/debian/changelog 2016-12-25 14:04:04.000000000 +0000 +++ liburi-template-perl-0.24/debian/changelog 2019-02-21 16:11:16.000000000 +0000 @@ -1,3 +1,10 @@ +liburi-template-perl (0.24-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Jonas Smedegaard Thu, 21 Feb 2019 17:11:16 +0100 + liburi-template-perl (0.22-0.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru liburi-template-perl-0.22/inc/Module/Install/Base.pm liburi-template-perl-0.24/inc/Module/Install/Base.pm --- liburi-template-perl-0.22/inc/Module/Install/Base.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Base.pm 2018-09-20 17:55:59.000000000 +0000 @@ -4,7 +4,7 @@ use strict 'vars'; use vars qw{$VERSION}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; } # Suspend handler for "redefined" warnings diff -Nru liburi-template-perl-0.22/inc/Module/Install/Can.pm liburi-template-perl-0.24/inc/Module/Install/Can.pm --- liburi-template-perl-0.22/inc/Module/Install/Can.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Can.pm 2018-09-20 17:55:59.000000000 +0000 @@ -8,7 +8,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -121,6 +121,15 @@ # Can we locate a (the) C compiler sub can_cc { my $self = shift; + + if ($^O eq 'VMS') { + require ExtUtils::CBuilder; + my $builder = ExtUtils::CBuilder->new( + quiet => 1, + ); + return $builder->have_compiler; + } + my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part @@ -151,4 +160,4 @@ __END__ -#line 236 +#line 245 diff -Nru liburi-template-perl-0.22/inc/Module/Install/Fetch.pm liburi-template-perl-0.24/inc/Module/Install/Fetch.pm --- liburi-template-perl-0.22/inc/Module/Install/Fetch.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Fetch.pm 2018-09-20 17:55:59.000000000 +0000 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -Nru liburi-template-perl-0.22/inc/Module/Install/Makefile.pm liburi-template-perl-0.24/inc/Module/Install/Makefile.pm --- liburi-template-perl-0.22/inc/Module/Install/Makefile.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Makefile.pm 2018-09-20 17:55:59.000000000 +0000 @@ -8,7 +8,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -133,7 +133,7 @@ return $args; } -# For mm args that take multiple space-seperated args, +# For mm args that take multiple space-separated args, # append an argument to the current list. sub makemaker_append { my $self = shift; diff -Nru liburi-template-perl-0.22/inc/Module/Install/Metadata.pm liburi-template-perl-0.24/inc/Module/Install/Metadata.pm --- liburi-template-perl-0.22/inc/Module/Install/Metadata.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Metadata.pm 2018-09-20 17:55:59.000000000 +0000 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } @@ -347,7 +347,7 @@ ^ \s* package \s* ([\w:]+) - \s* ; + [\s|;]* /ixms ) { my ($name, $module_name) = ($1, $1); @@ -705,7 +705,7 @@ my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); my $meta = $yaml[0]; - # Overwrite the non-configure dependency hashs + # Overwrite the non-configure dependency hashes delete $meta->{requires}; delete $meta->{build_requires}; delete $meta->{recommends}; diff -Nru liburi-template-perl-0.22/inc/Module/Install/Win32.pm liburi-template-perl-0.24/inc/Module/Install/Win32.pm --- liburi-template-perl-0.22/inc/Module/Install/Win32.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/Win32.pm 2018-09-20 17:55:59.000000000 +0000 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } diff -Nru liburi-template-perl-0.22/inc/Module/Install/WriteAll.pm liburi-template-perl-0.24/inc/Module/Install/WriteAll.pm --- liburi-template-perl-0.22/inc/Module/Install/WriteAll.pm 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install/WriteAll.pm 2018-09-20 17:55:59.000000000 +0000 @@ -6,7 +6,7 @@ use vars qw{$VERSION @ISA $ISCORE}; BEGIN { - $VERSION = '1.06'; + $VERSION = '1.19'; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } diff -Nru liburi-template-perl-0.22/inc/Module/Install.pm liburi-template-perl-0.24/inc/Module/Install.pm --- liburi-template-perl-0.22/inc/Module/Install.pm 2015-04-04 17:29:56.000000000 +0000 +++ liburi-template-perl-0.24/inc/Module/Install.pm 2018-09-20 17:55:58.000000000 +0000 @@ -17,7 +17,7 @@ # 3. The ./inc/ version of Module::Install loads # } -use 5.005; +use 5.006; use strict 'vars'; use Cwd (); use File::Find (); @@ -31,7 +31,7 @@ # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. - $VERSION = '1.06'; + $VERSION = '1.19'; # Storage for the pseudo-singleton $MAIN = undef; @@ -156,10 +156,10 @@ sub autoload { my $self = shift; my $who = $self->_caller; - my $cwd = Cwd::cwd(); + my $cwd = Cwd::getcwd(); my $sym = "${who}::AUTOLOAD"; $sym->{$cwd} = sub { - my $pwd = Cwd::cwd(); + my $pwd = Cwd::getcwd(); if ( my $code = $sym->{$pwd} ) { # Delegate back to parent dirs goto &$code unless $cwd eq $pwd; @@ -239,11 +239,13 @@ # ignore the prefix on extension modules built from top level. my $base_path = Cwd::abs_path($FindBin::Bin); - unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { + unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) { delete $args{prefix}; } return $args{_self} if $args{_self}; + $base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS'; + $args{dispatch} ||= 'Admin'; $args{prefix} ||= 'inc'; $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); @@ -322,7 +324,7 @@ my ($self, $path) = @_; my @found; - File::Find::find( sub { + File::Find::find( {no_chdir => 1, wanted => sub { my $file = $File::Find::name; return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; my $subpath = $1; @@ -336,9 +338,9 @@ # correctly. Otherwise, root through the file to locate the case-preserved # version of the package name. if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { - my $content = Module::Install::_read($subpath . '.pm'); + my $content = Module::Install::_read($File::Find::name); my $in_pod = 0; - foreach ( split //, $content ) { + foreach ( split /\n/, $content ) { $in_pod = 1 if /^=\w/; $in_pod = 0 if /^=cut/; next if ($in_pod || /^=cut/); # skip pod text @@ -351,7 +353,7 @@ } push @found, [ $file, $pkg ]; - }, $path ) if -d $path; + }}, $path ) if -d $path; @found; } @@ -373,24 +375,14 @@ return $call; } -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _read { local *FH; open( FH, '<', $_[0] ) or die "open($_[0]): $!"; + binmode FH; my $string = do { local $/; }; close FH or die "close($_[0]): $!"; return $string; } -END_NEW -sub _read { - local *FH; - open( FH, "< $_[0]" ) or die "open($_[0]): $!"; - my $string = do { local $/; }; - close FH or die "close($_[0]): $!"; - return $string; -} -END_OLD sub _readperl { my $string = Module::Install::_read($_[0]); @@ -411,30 +403,19 @@ return $string; } -# Done in evals to avoid confusing Perl::MinimumVersion -eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _write { local *FH; open( FH, '>', $_[0] ) or die "open($_[0]): $!"; + binmode FH; foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; } close FH or die "close($_[0]): $!"; } -END_NEW -sub _write { - local *FH; - open( FH, "> $_[0]" ) or die "open($_[0]): $!"; - foreach ( 1 .. $#_ ) { - print FH $_[$_] or die "print($_[0]): $!"; - } - close FH or die "close($_[0]): $!"; -} -END_OLD # _version is for processing module versions (eg, 1.03_05) not # Perl versions (eg, 5.8.1). -sub _version ($) { +sub _version { my $s = shift || 0; my $d =()= $s =~ /(\.)/g; if ( $d >= 2 ) { @@ -450,12 +431,12 @@ return $l + 0; } -sub _cmp ($$) { +sub _cmp { _version($_[1]) <=> _version($_[2]); } # Cloned from Params::Util::_CLASS -sub _CLASS ($) { +sub _CLASS { ( defined $_[0] and diff -Nru liburi-template-perl-0.22/lib/URI/Template.pm liburi-template-perl-0.24/lib/URI/Template.pm --- liburi-template-perl-0.22/lib/URI/Template.pm 2015-04-04 17:29:05.000000000 +0000 +++ liburi-template-perl-0.24/lib/URI/Template.pm 2018-09-20 17:53:55.000000000 +0000 @@ -3,13 +3,26 @@ use strict; use warnings; -our $VERSION = '0.22'; +our $VERSION = '0.24'; use URI; use URI::Escape (); use Unicode::Normalize (); use overload '""' => \&template; +use Exporter 'import'; + +our @EXPORT = qw ( ); + +our @EXPORT_OK = qw ( + template_process + template_process_to_string +); + +our %EXPORT_TAGS = ( + 'all' => \@EXPORT_OK, +); + my $RESERVED = q(:/?#\[\]\@!\$\&'\(\)\*\+,;=); my %TOSTRING = ( '' => \&_tostring, @@ -36,9 +49,22 @@ sub _quote { my ( $val, $safe ) = @_; $safe ||= ''; + my $unsafe = '^A-Za-z0-9\-\._' . $safe; + + ## Where RESERVED are allowed to pass-through, so are + ## already-pct-encoded values + if( $safe ) { + my (@chunks) = split(/(%[0-9A-Fa-f]{2})/, $val); + + # even chunks are not %xx, odd chunks are + return join '', + map { $_ % 2 + ? $chunks[$_] + : URI::Escape::uri_escape_utf8( Unicode::Normalize::NFKC($chunks[$_]), $unsafe ) } 0..$#chunks; + + } # try to mirror python's urllib quote - my $unsafe = '^A-Za-z0-9\-\._' . $safe; return URI::Escape::uri_escape_utf8( Unicode::Normalize::NFKC( $val ), $unsafe ); } @@ -331,6 +357,14 @@ return $str; } +sub template_process { + __PACKAGE__->new(shift)->process(@_) +} + +sub template_process_to_string { + __PACKAGE__->new(shift)->process_to_string(@_) +} + 1; __END__ @@ -345,7 +379,7 @@ my $template = URI::Template->new( 'http://example.com/{x}' ); my $uri = $template->process( x => 'y' ); - + # or my $template = URI::Template->new(); @@ -354,6 +388,12 @@ # uri is a URI object with value 'http://example.com/y' +or + + use URI::Template ':template_process' + + my $uri = template_process ( 'http://example.com/{x}', x => 'y' ); + =head1 DESCRIPTION This module provides a wrapper around URI templates as described in RFC 6570: @@ -398,6 +438,19 @@ Processes input like the C method, but doesn't inflate the result to a URI object. +=head1 EXPORTED FUNCTIONS + +=head2 template_process( $template => \%vars ) + +This is the same as C<< URI::Template->new($template)->process(\%vars) >> But +shorter, and usefull for quick and easy genrating a nice URI form parameters. + +Returns an L object + +=head2 template_process_as_string( $template => \%vars ) + +Same as above, but obviously, returns a string. + =head1 AUTHORS =over 4 @@ -408,9 +461,15 @@ =back +=head1 CONTRIBUTERS + +=over 4 + +=item * Theo van Hoesel ETh.J.v.Hoesel@THEMA-MEDIA.nlE + =head1 COPYRIGHT AND LICENSE -Copyright 2007-2015 by Brian Cassidy +Copyright 2007-2018 by Brian Cassidy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru liburi-template-perl-0.22/Makefile.PL liburi-template-perl-0.24/Makefile.PL --- liburi-template-perl-0.22/Makefile.PL 2012-05-25 15:00:05.000000000 +0000 +++ liburi-template-perl-0.24/Makefile.PL 2018-09-20 17:49:17.000000000 +0000 @@ -1,3 +1,4 @@ +BEGIN { push @INC, '.'; } use inc::Module::Install 1.06; if ( -e 'MANIFEST.SKIP' ) { diff -Nru liburi-template-perl-0.22/MANIFEST liburi-template-perl-0.24/MANIFEST --- liburi-template-perl-0.22/MANIFEST 2015-04-04 17:27:57.000000000 +0000 +++ liburi-template-perl-0.24/MANIFEST 2018-09-20 17:56:05.000000000 +0000 @@ -15,12 +15,7 @@ t/01-use.t t/10-basic.t t/12-suite.t +t/14-template_process.t t/98-pod.t t/99-podcoverage.t -t/cases/extended-tests.json -t/cases/json2xml.xslt -t/cases/negative-tests.json -t/cases/spec-examples-by-section.json -t/cases/spec-examples.json -t/cases/transform-json-tests.xslt t/gh-4.t diff -Nru liburi-template-perl-0.22/META.yml liburi-template-perl-0.24/META.yml --- liburi-template-perl-0.22/META.yml 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/META.yml 2018-09-20 17:55:59.000000000 +0000 @@ -9,7 +9,7 @@ ExtUtils::MakeMaker: 6.59 distribution_type: module dynamic_config: 1 -generated_by: 'Module::Install version 1.06' +generated_by: 'Module::Install version 1.19' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -27,4 +27,4 @@ resources: license: http://dev.perl.org/licenses/ repository: http://github.com/bricas/uri-template -version: 0.22 +version: '0.24' diff -Nru liburi-template-perl-0.22/README liburi-template-perl-0.24/README --- liburi-template-perl-0.22/README 2015-04-04 17:29:57.000000000 +0000 +++ liburi-template-perl-0.24/README 2018-09-20 17:55:59.000000000 +0000 @@ -6,7 +6,7 @@ my $template = URI::Template->new( 'http://example.com/{x}' ); my $uri = $template->process( x => 'y' ); - + # or my $template = URI::Template->new(); @@ -15,6 +15,12 @@ # uri is a URI object with value 'http://example.com/y' + or + + use URI::Template ':template_process' + + my $uri = template_process ( 'http://example.com/{x}', x => 'y' ); + DESCRIPTION This module provides a wrapper around URI templates as described in RFC 6570: . @@ -52,13 +58,27 @@ Processes input like the "process" method, but doesn't inflate the result to a URI object. +EXPORTED FUNCTIONS + template_process( $template => \%vars ) + This is the same as "URI::Template->new($template)->process(\%vars)" But + shorter, and usefull for quick and easy genrating a nice URI form + parameters. + + Returns an URI object + + template_process_as_string( $template => \%vars ) + Same as above, but obviously, returns a string. + AUTHORS * Brian Cassidy * Ricardo SIGNES +CONTRIBUTERS + * Theo van Hoesel + COPYRIGHT AND LICENSE - Copyright 2007-2015 by Brian Cassidy + Copyright 2007-2018 by Brian Cassidy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru liburi-template-perl-0.22/t/14-template_process.t liburi-template-perl-0.24/t/14-template_process.t --- liburi-template-perl-0.22/t/14-template_process.t 1970-01-01 00:00:00.000000000 +0000 +++ liburi-template-perl-0.24/t/14-template_process.t 2018-09-20 17:49:17.000000000 +0000 @@ -0,0 +1,29 @@ +use strict; +use warnings; + +use Test::More tests => 2; + +use URI::Template ':all'; + +ok ( + template_process( "http://my.host.com/{user}", + user => "vanHoesel", + )->path + eq + "/vanHoesel", + "template_process creates the right URI object" +); + +ok ( + template_process_to_string( "http://my.host.com/{user}", + user => "vanHoesel", + ) + eq + "http://my.host.com/vanHoesel", + "template_process_to_string creates the right string" +); + + +done_testing(); + +1; diff -Nru liburi-template-perl-0.22/t/cases/extended-tests.json liburi-template-perl-0.24/t/cases/extended-tests.json --- liburi-template-perl-0.22/t/cases/extended-tests.json 2013-12-05 20:16:34.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/extended-tests.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -{ - "Additional Examples 1":{ - "level":4, - "variables":{ - "id" : "person", - "token" : "12345", - "fields" : ["id", "name", "picture"], - "format" : "json", - "q" : "URI Templates", - "page" : "5", - "lang" : "en", - "geocode" : ["37.76","-122.427"], - "first_name" : "John", - "last.name" : "Doe", - "Some%20Thing" : "foo", - "number" : 6, - "long" : 37.76, - "lat" : -122.427, - "group_id" : "12345", - "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }", - "uri" : "http://example.org/?uri=http%3A%2F%2Fexample.org%2F", - "word" : "drücken", - "Stra%C3%9Fe" : "Grüner Weg", - "random" : "šö䟜ñꀣ¥‡ÑÒÓÔÕÖ×ØÙÚàáâãäåæçÿ", - "assoc_special_chars" : - { "šö䟜ñꀣ¥‡ÑÒÓÔÕ" : "Ö×ØÙÚàáâãäåæçÿ" } - }, - "testcases":[ - - [ "{/id*}" , "/person" ], - [ "{/id*}{?fields,first_name,last.name,token}" , [ - "/person?fields=id,name,picture&first_name=John&last.name=Doe&token=12345", - "/person?fields=id,picture,name&first_name=John&last.name=Doe&token=12345", - "/person?fields=picture,name,id&first_name=John&last.name=Doe&token=12345", - "/person?fields=picture,id,name&first_name=John&last.name=Doe&token=12345", - "/person?fields=name,picture,id&first_name=John&last.name=Doe&token=12345", - "/person?fields=name,id,picture&first_name=John&last.name=Doe&token=12345"] - ], - ["/search.{format}{?q,geocode,lang,locale,page,result_type}", - [ "/search.json?q=URI%20Templates&geocode=37.76,-122.427&lang=en&page=5", - "/search.json?q=URI%20Templates&geocode=-122.427,37.76&lang=en&page=5"] - ], - ["/test{/Some%20Thing}", "/test/foo" ], - ["/set{?number}", "/set?number=6"], - ["/loc{?long,lat}" , "/loc?long=37.76&lat=-122.427"], - ["/base{/group_id,first_name}/pages{/page,lang}{?format,q}","/base/12345/John/pages/5/en?format=json&q=URI%20Templates"], - ["/sparql{?query}", "/sparql?query=PREFIX%20dc%3A%20%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%20SELECT%20%3Fbook%20%3Fwho%20WHERE%20%7B%20%3Fbook%20dc%3Acreator%20%3Fwho%20%7D"], - ["/go{?uri}", "/go?uri=http%3A%2F%2Fexample.org%2F%3Furi%3Dhttp%253A%252F%252Fexample.org%252F"], - ["/service{?word}", "/service?word=dr%C3%BCcken"], - ["/lookup{?Stra%C3%9Fe}", "/lookup?Stra%C3%9Fe=Gr%C3%BCner%20Weg"], - ["{random}" , "%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"], - ["{?assoc_special_chars*}", "?%C5%A1%C3%B6%C3%A4%C5%B8%C5%93%C3%B1%C3%AA%E2%82%AC%C2%A3%C2%A5%E2%80%A1%C3%91%C3%92%C3%93%C3%94%C3%95=%C3%96%C3%97%C3%98%C3%99%C3%9A%C3%A0%C3%A1%C3%A2%C3%A3%C3%A4%C3%A5%C3%A6%C3%A7%C3%BF"] - ] - }, - "Additional Examples 2":{ - "level":4, - "variables":{ - "id" : ["person","albums"], - "token" : "12345", - "fields" : ["id", "name", "picture"], - "format" : "atom", - "q" : "URI Templates", - "page" : "10", - "start" : "5", - "lang" : "en", - "geocode" : ["37.76","-122.427"] - }, - "testcases":[ - - [ "{/id*}" , ["/person/albums","/albums/person"] ], - [ "{/id*}{?fields,token}" , [ - "/person/albums?fields=id,name,picture&token=12345", - "/person/albums?fields=id,picture,name&token=12345", - "/person/albums?fields=picture,name,id&token=12345", - "/person/albums?fields=picture,id,name&token=12345", - "/person/albums?fields=name,picture,id&token=12345", - "/person/albums?fields=name,id,picture&token=12345", - "/albums/person?fields=id,name,picture&token=12345", - "/albums/person?fields=id,picture,name&token=12345", - "/albums/person?fields=picture,name,id&token=12345", - "/albums/person?fields=picture,id,name&token=12345", - "/albums/person?fields=name,picture,id&token=12345", - "/albums/person?fields=name,id,picture&token=12345"] - ] - ] - }, - "Additional Examples 3: Empty Variables":{ - "variables" : { - "empty_list" : [], - "empty_assoc" : {} - }, - "testcases":[ - [ "{/empty_list}", [ "" ] ], - [ "{/empty_list*}", [ "" ] ], - [ "{?empty_list}", [ ""] ], - [ "{?empty_list*}", [ "" ] ], - [ "{?empty_assoc}", [ "" ] ], - [ "{?empty_assoc*}", [ "" ] ] - ] - }, - "Additional Examples 4: Numeric Keys":{ - "variables" : { - "42" : "The Answer to the Ultimate Question of Life, the Universe, and Everything", - "1337" : ["leet", "as","it", "can","be"], - "german" : { - "11": "elf", - "12": "zwölf" - } - }, - "testcases":[ - [ "{42}", "The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"], - [ "{?42}", "?42=The%20Answer%20to%20the%20Ultimate%20Question%20of%20Life%2C%20the%20Universe%2C%20and%20Everything"], - [ "{1337}", "leet,as,it,can,be"], - [ "{?1337*}", "?1337=leet&1337=as&1337=it&1337=can&1337=be"], - [ "{?german*}", [ "?11=elf&12=zw%C3%B6lf", "?12=zw%C3%B6lf&11=elf"] ] - ] - } -} diff -Nru liburi-template-perl-0.22/t/cases/json2xml.xslt liburi-template-perl-0.24/t/cases/json2xml.xslt --- liburi-template-perl-0.22/t/cases/json2xml.xslt 2013-03-11 15:00:15.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/json2xml.xslt 1970-01-01 00:00:00.000000000 +0000 @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \b - - - - - - - - - - - \v - - - - - \f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru liburi-template-perl-0.22/t/cases/negative-tests.json liburi-template-perl-0.24/t/cases/negative-tests.json --- liburi-template-perl-0.22/t/cases/negative-tests.json 2013-12-05 20:16:34.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/negative-tests.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -{ - "Failure Tests":{ - "level":4, - "variables":{ - "id" : "thing", - "var" : "value", - "hello" : "Hello World!", - "with space" : "fail", - " leading_space" : "Hi!", - "trailing_space " : "Bye!", - "empty" : "", - "path" : "/foo/bar", - "x" : "1024", - "y" : "768", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "example" : "red", - "searchTerms" : "uri templates", - "~thing" : "some-user", - "default-graph-uri" : ["http://www.example/book/","http://www.example/papers/"], - "query" : "PREFIX dc: SELECT ?book ?who WHERE { ?book dc:creator ?who }" - - }, - "testcases":[ - [ "{/id*", false ], - [ "/id*}", false ], - [ "{/?id}", false ], - [ "{var:prefix}", false ], - [ "{hello:2*}", false ] , - [ "{??hello}", false ] , - [ "{!hello}", false ] , - [ "{with space}", false], - [ "{ leading_space}", false], - [ "{trailing_space }", false], - [ "{=path}", false ] , - [ "{$var}", false ], - [ "{|var*}", false ], - [ "{*keys?}", false ], - [ "{?empty=default,var}", false ], - [ "{var}{-prefix|/-/|var}" , false ], - [ "?q={searchTerms}&c={example:color?}" , false ], - [ "x{?empty|foo=none}" , false ], - [ "/h{#hello+}" , false ], - [ "/h#{hello+}" , false ], - [ "{keys:1}", false ], - [ "{+keys:1}", false ], - [ "{;keys:1*}", false ], - [ "?{-join|&|var,list}" , false ], - [ "/people/{~thing}", false], - [ "/{default-graph-uri}", false ], - [ "/sparql{?query,default-graph-uri}", false ], - [ "/sparql{?query){&default-graph-uri*}", false ], - [ "/resolution{?x, y}" , false ] - - ] - } -} \ No newline at end of file diff -Nru liburi-template-perl-0.22/t/cases/spec-examples-by-section.json liburi-template-perl-0.24/t/cases/spec-examples-by-section.json --- liburi-template-perl-0.22/t/cases/spec-examples-by-section.json 2013-12-05 20:16:34.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/spec-examples-by-section.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,439 +0,0 @@ -{ - "3.2.1 Variable Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{count}", "one,two,three"], - ["{count*}", "one,two,three"], - ["{/count}", "/one,two,three"], - ["{/count*}", "/one/two/three"], - ["{;count}", ";count=one,two,three"], - ["{;count*}", ";count=one;count=two;count=three"], - ["{?count}", "?count=one,two,three"], - ["{?count*}", "?count=one&count=two&count=three"], - ["{&count*}", "&count=one&count=two&count=three"] - ] - }, - "3.2.2 Simple String Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{var}", "value"], - ["{hello}", "Hello%20World%21"], - ["{half}", "50%25"], - ["O{empty}X", "OX"], - ["O{undef}X", "OX"], - ["{x,y}", "1024,768"], - ["{x,hello,y}", "1024,Hello%20World%21,768"], - ["?{x,empty}", "?1024,"], - ["?{x,undef}", "?1024"], - ["?{undef,y}", "?768"], - ["{var:3}", "val"], - ["{var:30}", "value"], - ["{list}", "red,green,blue"], - ["{list*}", "red,green,blue"], - ["{keys}", [ - "comma,%2C,dot,.,semi,%3B", - "comma,%2C,semi,%3B,dot,.", - "dot,.,comma,%2C,semi,%3B", - "dot,.,semi,%3B,comma,%2C", - "semi,%3B,comma,%2C,dot,.", - "semi,%3B,dot,.,comma,%2C" - ]], - ["{keys*}", [ - "comma=%2C,dot=.,semi=%3B", - "comma=%2C,semi=%3B,dot=.", - "dot=.,comma=%2C,semi=%3B", - "dot=.,semi=%3B,comma=%2C", - "semi=%3B,comma=%2C,dot=.", - "semi=%3B,dot=.,comma=%2C" - ]] - ] - }, - "3.2.3 Reserved Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{+var}", "value"], - ["{/var,empty}", "/value/"], - ["{/var,undef}", "/value"], - ["{+hello}", "Hello%20World!"], - ["{+half}", "50%25"], - ["{base}index", "http%3A%2F%2Fexample.com%2Fhome%2Findex"], - ["{+base}index", "http://example.com/home/index"], - ["O{+empty}X", "OX"], - ["O{+undef}X", "OX"], - ["{+path}/here", "/foo/bar/here"], - ["{+path:6}/here", "/foo/b/here"], - ["here?ref={+path}", "here?ref=/foo/bar"], - ["up{+path}{var}/here", "up/foo/barvalue/here"], - ["{+x,hello,y}", "1024,Hello%20World!,768"], - ["{+path,x}/here", "/foo/bar,1024/here"], - ["{+list}", "red,green,blue"], - ["{+list*}", "red,green,blue"], - ["{+keys}", [ - "comma,,,dot,.,semi,;", - "comma,,,semi,;,dot,.", - "dot,.,comma,,,semi,;", - "dot,.,semi,;,comma,,", - "semi,;,comma,,,dot,.", - "semi,;,dot,.,comma,," - ]], - ["{+keys*}", [ - "comma=,,dot=.,semi=;", - "comma=,,semi=;,dot=.", - "dot=.,comma=,,semi=;", - "dot=.,semi=;,comma=,", - "semi=;,comma=,,dot=.", - "semi=;,dot=.,comma=," - ]] - ] - }, - "3.2.4 Fragment Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{#var}", "#value"], - ["{#hello}", "#Hello%20World!"], - ["{#half}", "#50%25"], - ["foo{#empty}", "foo#"], - ["foo{#undef}", "foo"], - ["{#x,hello,y}", "#1024,Hello%20World!,768"], - ["{#path,x}/here", "#/foo/bar,1024/here"], - ["{#path:6}/here", "#/foo/b/here"], - ["{#list}", "#red,green,blue"], - ["{#list*}", "#red,green,blue"], - ["{#keys}", [ - "#comma,,,dot,.,semi,;", - "#comma,,,semi,;,dot,.", - "#dot,.,comma,,,semi,;", - "#dot,.,semi,;,comma,,", - "#semi,;,comma,,,dot,.", - "#semi,;,dot,.,comma,," - ]] - ] - }, - "3.2.5 Label Expansion with Dot-Prefix" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{.who}", ".fred"], - ["{.who,who}", ".fred.fred"], - ["{.half,who}", ".50%25.fred"], - ["www{.dom*}", "www.example.com"], - ["X{.var}", "X.value"], - ["X{.var:3}", "X.val"], - ["X{.empty}", "X."], - ["X{.undef}", "X"], - ["X{.list}", "X.red,green,blue"], - ["X{.list*}", "X.red.green.blue"], - ["{#keys}", [ - "#comma,,,dot,.,semi,;", - "#comma,,,semi,;,dot,.", - "#dot,.,comma,,,semi,;", - "#dot,.,semi,;,comma,,", - "#semi,;,comma,,,dot,.", - "#semi,;,dot,.,comma,," - ]], - ["{#keys*}", [ - "#comma=,,dot=.,semi=;", - "#comma=,,semi=;,dot=.", - "#dot=.,comma=,,semi=;", - "#dot=.,semi=;,comma=,", - "#semi=;,comma=,,dot=.", - "#semi=;,dot=.,comma=," - ]], - ["X{.empty_keys}", "X"], - ["X{.empty_keys*}", "X"] - ] - }, - "3.2.6 Path Segment Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{/who}", "/fred"], - ["{/who,who}", "/fred/fred"], - ["{/half,who}", "/50%25/fred"], - ["{/who,dub}", "/fred/me%2Ftoo"], - ["{/var}", "/value"], - ["{/var,empty}", "/value/"], - ["{/var,undef}", "/value"], - ["{/var,x}/here", "/value/1024/here"], - ["{/var:1,var}", "/v/value"], - ["{/list}", "/red,green,blue"], - ["{/list*}", "/red/green/blue"], - ["{/list*,path:4}", "/red/green/blue/%2Ffoo"], - ["{/keys}", [ - "/comma,%2C,dot,.,semi,%3B", - "/comma,%2C,semi,%3B,dot,.", - "/dot,.,comma,%2C,semi,%3B", - "/dot,.,semi,%3B,comma,%2C", - "/semi,%3B,comma,%2C,dot,.", - "/semi,%3B,dot,.,comma,%2C" - ]], - ["{/keys*}", [ - "/comma=%2C/dot=./semi=%3B", - "/comma=%2C/semi=%3B/dot=.", - "/dot=./comma=%2C/semi=%3B", - "/dot=./semi=%3B/comma=%2C", - "/semi=%3B/comma=%2C/dot=.", - "/semi=%3B/dot=./comma=%2C" - ]] - ] - }, - "3.2.7 Path-Style Parameter Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{;who}", ";who=fred"], - ["{;half}", ";half=50%25"], - ["{;empty}", ";empty"], - ["{;hello:5}", ";hello=Hello"], - ["{;v,empty,who}", ";v=6;empty;who=fred"], - ["{;v,bar,who}", ";v=6;who=fred"], - ["{;x,y}", ";x=1024;y=768"], - ["{;x,y,empty}", ";x=1024;y=768;empty"], - ["{;x,y,undef}", ";x=1024;y=768"], - ["{;list}", ";list=red,green,blue"], - ["{;list*}", ";list=red;list=green;list=blue"], - ["{;keys}", [ - ";keys=comma,%2C,dot,.,semi,%3B", - ";keys=comma,%2C,semi,%3B,dot,.", - ";keys=dot,.,comma,%2C,semi,%3B", - ";keys=dot,.,semi,%3B,comma,%2C", - ";keys=semi,%3B,comma,%2C,dot,.", - ";keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{;keys*}", [ - ";comma=%2C;dot=.;semi=%3B", - ";comma=%2C;semi=%3B;dot=.", - ";dot=.;comma=%2C;semi=%3B", - ";dot=.;semi=%3B;comma=%2C", - ";semi=%3B;comma=%2C;dot=.", - ";semi=%3B;dot=.;comma=%2C" - ]] - ] - }, - "3.2.8 Form-Style Query Expansion" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{?who}", "?who=fred"], - ["{?half}", "?half=50%25"], - ["{?x,y}", "?x=1024&y=768"], - ["{?x,y,empty}", "?x=1024&y=768&empty="], - ["{?x,y,undef}", "?x=1024&y=768"], - ["{?var:3}", "?var=val"], - ["{?list}", "?list=red,green,blue"], - ["{?list*}", "?list=red&list=green&list=blue"], - ["{?keys}", [ - "?keys=comma,%2C,dot,.,semi,%3B", - "?keys=comma,%2C,semi,%3B,dot,.", - "?keys=dot,.,comma,%2C,semi,%3B", - "?keys=dot,.,semi,%3B,comma,%2C", - "?keys=semi,%3B,comma,%2C,dot,.", - "?keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{?keys*}", [ - "?comma=%2C&dot=.&semi=%3B", - "?comma=%2C&semi=%3B&dot=.", - "?dot=.&comma=%2C&semi=%3B", - "?dot=.&semi=%3B&comma=%2C", - "?semi=%3B&comma=%2C&dot=.", - "?semi=%3B&dot=.&comma=%2C" - ]] - ] - }, - "3.2.9 Form-Style Query Continuation" : - { - "variables": { - "count" : ["one", "two", "three"], - "dom" : ["example", "com"], - "dub" : "me/too", - "hello" : "Hello World!", - "half" : "50%", - "var" : "value", - "who" : "fred", - "base" : "http://example.com/home/", - "path" : "/foo/bar", - "list" : ["red", "green", "blue"], - "keys" : { "semi" : ";", "dot" : ".", "comma" : ","}, - "v" : "6", - "x" : "1024", - "y" : "768", - "empty" : "", - "empty_keys" : [], - "undef" : null - }, - "testcases" : [ - ["{&who}", "&who=fred"], - ["{&half}", "&half=50%25"], - ["?fixed=yes{&x}", "?fixed=yes&x=1024"], - ["{&var:3}", "&var=val"], - ["{&x,y,empty}", "&x=1024&y=768&empty="], - ["{&x,y,undef}", "&x=1024&y=768"], - ["{&list}", "&list=red,green,blue"], - ["{&list*}", "&list=red&list=green&list=blue"], - ["{&keys}", [ - "&keys=comma,%2C,dot,.,semi,%3B", - "&keys=comma,%2C,semi,%3B,dot,.", - "&keys=dot,.,comma,%2C,semi,%3B", - "&keys=dot,.,semi,%3B,comma,%2C", - "&keys=semi,%3B,comma,%2C,dot,.", - "&keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{&keys*}", [ - "&comma=%2C&dot=.&semi=%3B", - "&comma=%2C&semi=%3B&dot=.", - "&dot=.&comma=%2C&semi=%3B", - "&dot=.&semi=%3B&comma=%2C", - "&semi=%3B&comma=%2C&dot=.", - "&semi=%3B&dot=.&comma=%2C" - ]] - ] - } -} diff -Nru liburi-template-perl-0.22/t/cases/spec-examples.json liburi-template-perl-0.24/t/cases/spec-examples.json --- liburi-template-perl-0.22/t/cases/spec-examples.json 2012-05-25 18:36:23.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/spec-examples.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -{ - "Level 1 Examples" : - { - "level": 1, - "variables": { - "var" : "value", - "hello" : "Hello World!" - }, - "testcases" : [ - ["{var}", "value"], - ["{hello}", "Hello%20World%21"] - ] - }, - "Level 2 Examples" : - { - "level": 2, - "variables": { - "var" : "value", - "hello" : "Hello World!", - "path" : "/foo/bar" - }, - "testcases" : [ - ["{+var}", "value"], - ["{+hello}", "Hello%20World!"], - ["{+path}/here", "/foo/bar/here"], - ["here?ref={+path}", "here?ref=/foo/bar"] - ] - }, - "Level 3 Examples" : - { - "level": 3, - "variables": { - "var" : "value", - "hello" : "Hello World!", - "empty" : "", - "path" : "/foo/bar", - "x" : "1024", - "y" : "768" - }, - "testcases" : [ - ["map?{x,y}", "map?1024,768"], - ["{x,hello,y}", "1024,Hello%20World%21,768"], - ["{+x,hello,y}", "1024,Hello%20World!,768"], - ["{+path,x}/here", "/foo/bar,1024/here"], - ["{#x,hello,y}", "#1024,Hello%20World!,768"], - ["{#path,x}/here", "#/foo/bar,1024/here"], - ["X{.var}", "X.value"], - ["X{.x,y}", "X.1024.768"], - ["{/var}", "/value"], - ["{/var,x}/here", "/value/1024/here"], - ["{;x,y}", ";x=1024;y=768"], - ["{;x,y,empty}", ";x=1024;y=768;empty"], - ["{?x,y}", "?x=1024&y=768"], - ["{?x,y,empty}", "?x=1024&y=768&empty="], - ["?fixed=yes{&x}", "?fixed=yes&x=1024"], - ["{&x,y,empty}", "&x=1024&y=768&empty="] - ] - }, - "Level 4 Examples" : - { - "level": 4, - "variables": { - "var": "value", - "hello": "Hello World!", - "path": "/foo/bar", - "list": ["red", "green", "blue"], - "keys": {"semi": ";", "dot": ".", "comma":","} - }, - "testcases": [ - ["{var:3}", "val"], - ["{var:30}", "value"], - ["{list}", "red,green,blue"], - ["{list*}", "red,green,blue"], - ["{keys}", [ - "comma,%2C,dot,.,semi,%3B", - "comma,%2C,semi,%3B,dot,.", - "dot,.,comma,%2C,semi,%3B", - "dot,.,semi,%3B,comma,%2C", - "semi,%3B,comma,%2C,dot,.", - "semi,%3B,dot,.,comma,%2C" - ]], - ["{keys*}", [ - "comma=%2C,dot=.,semi=%3B", - "comma=%2C,semi=%3B,dot=.", - "dot=.,comma=%2C,semi=%3B", - "dot=.,semi=%3B,comma=%2C", - "semi=%3B,comma=%2C,dot=.", - "semi=%3B,dot=.,comma=%2C" - ]], - ["{+path:6}/here", "/foo/b/here"], - ["{+list}", "red,green,blue"], - ["{+list*}", "red,green,blue"], - ["{+keys}", [ - "comma,,,dot,.,semi,;", - "comma,,,semi,;,dot,.", - "dot,.,comma,,,semi,;", - "dot,.,semi,;,comma,,", - "semi,;,comma,,,dot,.", - "semi,;,dot,.,comma,," - ]], - ["{+keys*}", [ - "comma=,,dot=.,semi=;", - "comma=,,semi=;,dot=.", - "dot=.,comma=,,semi=;", - "dot=.,semi=;,comma=,", - "semi=;,comma=,,dot=.", - "semi=;,dot=.,comma=," - ]], - ["{#path:6}/here", "#/foo/b/here"], - ["{#list}", "#red,green,blue"], - ["{#list*}", "#red,green,blue"], - ["{#keys}", [ - "#comma,,,dot,.,semi,;", - "#comma,,,semi,;,dot,.", - "#dot,.,comma,,,semi,;", - "#dot,.,semi,;,comma,,", - "#semi,;,comma,,,dot,.", - "#semi,;,dot,.,comma,," - ]], - ["{#keys*}", [ - "#comma=,,dot=.,semi=;", - "#comma=,,semi=;,dot=.", - "#dot=.,comma=,,semi=;", - "#dot=.,semi=;,comma=,", - "#semi=;,comma=,,dot=.", - "#semi=;,dot=.,comma=," - ]], - ["X{.var:3}", "X.val"], - ["X{.list}", "X.red,green,blue"], - ["X{.list*}", "X.red.green.blue"], - ["X{.keys}", [ - "X.comma,%2C,dot,.,semi,%3B", - "X.comma,%2C,semi,%3B,dot,.", - "X.dot,.,comma,%2C,semi,%3B", - "X.dot,.,semi,%3B,comma,%2C", - "X.semi,%3B,comma,%2C,dot,.", - "X.semi,%3B,dot,.,comma,%2C" - ]], - ["{/var:1,var}", "/v/value"], - ["{/list}", "/red,green,blue"], - ["{/list*}", "/red/green/blue"], - ["{/list*,path:4}", "/red/green/blue/%2Ffoo"], - ["{/keys}", [ - "/comma,%2C,dot,.,semi,%3B", - "/comma,%2C,semi,%3B,dot,.", - "/dot,.,comma,%2C,semi,%3B", - "/dot,.,semi,%3B,comma,%2C", - "/semi,%3B,comma,%2C,dot,.", - "/semi,%3B,dot,.,comma,%2C" - ]], - ["{/keys*}", [ - "/comma=%2C/dot=./semi=%3B", - "/comma=%2C/semi=%3B/dot=.", - "/dot=./comma=%2C/semi=%3B", - "/dot=./semi=%3B/comma=%2C", - "/semi=%3B/comma=%2C/dot=.", - "/semi=%3B/dot=./comma=%2C" - ]], - ["{;hello:5}", ";hello=Hello"], - ["{;list}", ";list=red,green,blue"], - ["{;list*}", ";list=red;list=green;list=blue"], - ["{;keys}", [ - ";keys=comma,%2C,dot,.,semi,%3B", - ";keys=comma,%2C,semi,%3B,dot,.", - ";keys=dot,.,comma,%2C,semi,%3B", - ";keys=dot,.,semi,%3B,comma,%2C", - ";keys=semi,%3B,comma,%2C,dot,.", - ";keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{;keys*}", [ - ";comma=%2C;dot=.;semi=%3B", - ";comma=%2C;semi=%3B;dot=.", - ";dot=.;comma=%2C;semi=%3B", - ";dot=.;semi=%3B;comma=%2C", - ";semi=%3B;comma=%2C;dot=.", - ";semi=%3B;dot=.;comma=%2C" - ]], - ["{?var:3}", "?var=val"], - ["{?list}", "?list=red,green,blue"], - ["{?list*}", "?list=red&list=green&list=blue"], - ["{?keys}", [ - "?keys=comma,%2C,dot,.,semi,%3B", - "?keys=comma,%2C,semi,%3B,dot,.", - "?keys=dot,.,comma,%2C,semi,%3B", - "?keys=dot,.,semi,%3B,comma,%2C", - "?keys=semi,%3B,comma,%2C,dot,.", - "?keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{?keys*}", [ - "?comma=%2C&dot=.&semi=%3B", - "?comma=%2C&semi=%3B&dot=.", - "?dot=.&comma=%2C&semi=%3B", - "?dot=.&semi=%3B&comma=%2C", - "?semi=%3B&comma=%2C&dot=.", - "?semi=%3B&dot=.&comma=%2C" - ]], - ["{&var:3}", "&var=val"], - ["{&list}", "&list=red,green,blue"], - ["{&list*}", "&list=red&list=green&list=blue"], - ["{&keys}", [ - "&keys=comma,%2C,dot,.,semi,%3B", - "&keys=comma,%2C,semi,%3B,dot,.", - "&keys=dot,.,comma,%2C,semi,%3B", - "&keys=dot,.,semi,%3B,comma,%2C", - "&keys=semi,%3B,comma,%2C,dot,.", - "&keys=semi,%3B,dot,.,comma,%2C" - ]], - ["{&keys*}", [ - "&comma=%2C&dot=.&semi=%3B", - "&comma=%2C&semi=%3B&dot=.", - "&dot=.&comma=%2C&semi=%3B", - "&dot=.&semi=%3B&comma=%2C", - "&semi=%3B&comma=%2C&dot=.", - "&semi=%3B&dot=.&comma=%2C" - ]] - ] - } -} diff -Nru liburi-template-perl-0.22/t/cases/transform-json-tests.xslt liburi-template-perl-0.24/t/cases/transform-json-tests.xslt --- liburi-template-perl-0.22/t/cases/transform-json-tests.xslt 2013-03-11 15:00:15.000000000 +0000 +++ liburi-template-perl-0.24/t/cases/transform-json-tests.xslt 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file