Hello community,
here is the log from the commit of package perl-URI
checked in at Mon Jun 30 19:05:31 CEST 2008.
--------
--- perl-URI/perl-URI.changes 2008-04-09 13:57:14.000000000 +0200
+++ perl-URI/perl-URI.changes 2008-06-27 16:28:31.000000000 +0200
@@ -1,0 +2,8 @@
+Fri Jun 27 16:27:48 CEST 2008 - anicka@suse.cz
+
+- update to 1.37
+ * Support ";" delimiter in $u->query_form
+ * We get different test result when www.perl.com doesn't resolve.
+ * URI::Heuristic didn't work for generic country code
+
+-------------------------------------------------------------------
Old:
----
URI-1.36-path.diff
URI-1.36.tar.bz2
New:
----
URI-1.37-path.diff
URI-1.37.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-URI.spec ++++++
--- /var/tmp/diff_new_pack.D24070/_old 2008-06-30 19:04:18.000000000 +0200
+++ /var/tmp/diff_new_pack.D24070/_new 2008-06-30 19:04:18.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-URI (Version 1.36)
+# spec file for package perl-URI (Version 1.37)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: perl-URI
-Version: 1.36
+Version: 1.37
Release: 1
Requires: perl = %{perl_version}
AutoReqProv: on
@@ -62,6 +62,11 @@
/var/adm/perl-modules/%{name}
%changelog
+* Fri Jun 27 2008 anicka@suse.cz
+- update to 1.37
+ * Support ";" delimiter in $u->query_form
+ * We get different test result when www.perl.com doesn't resolve.
+ * URI::Heuristic didn't work for generic country code
* Wed Apr 09 2008 anicka@suse.cz
- update to 1.36
* Escape Unicode strings as UTF-8.
++++++ URI-1.36-path.diff -> URI-1.37-path.diff ++++++
++++++ URI-1.36.tar.bz2 -> URI-1.37.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/Changes new/URI-1.37/Changes
--- old/URI-1.36/Changes 2008-04-03 00:30:51.000000000 +0200
+++ new/URI-1.37/Changes 2008-06-16 10:59:47.000000000 +0200
@@ -1,3 +1,18 @@
+2008-06-16 Gisle Aas
+
+ Release 1.37
+
+ Gisle Aas (1):
+ Support ";" delimiter in $u->query_form
+
+ Jan Dubois (1):
+ We get different test result when www.perl.com doesn't resolve.
+
+ Kenichi Ishigaki (1):
+ URI::Heuristic didn't work for generic country code [RT#35156]
+
+
+
2008-04-03 Gisle Aas
Release 1.36
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/META.yml new/URI-1.37/META.yml
--- old/URI-1.36/META.yml 2008-04-03 00:40:29.000000000 +0200
+++ new/URI-1.37/META.yml 2008-06-16 11:00:44.000000000 +0200
@@ -1,12 +1,13 @@
--- #YAML:1.0
name: URI
-version: 1.36
+version: 1.37
abstract: ~
license: ~
-generated_by: ExtUtils::MakeMaker version 6.3201
+author: ~
+generated_by: ExtUtils::MakeMaker version 6.42_01
distribution_type: module
requires:
MIME::Base64: 2
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/t/heuristic.t new/URI-1.37/t/heuristic.t
--- old/URI-1.36/t/heuristic.t 2008-04-02 17:09:07.000000000 +0200
+++ new/URI-1.37/t/heuristic.t 2008-04-03 14:53:38.000000000 +0200
@@ -45,7 +45,7 @@
# DNS probably work, lets run test 6..8
$URI::Heuristic::MY_COUNTRY = "bv";
- print "not " unless uf_urlstr("perl/camel.gif") eq "http://www.perl.com/camel.gif";
+ print "not " unless uf_urlstr("perl/camel.gif") =~ m,^http://www\.perl\.(com|org)/camel\.gif$,;
print "ok 6\n";
$URI::Heuristic::MY_COUNTRY = "uk";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/t/query.t new/URI-1.37/t/query.t
--- old/URI-1.36/t/query.t 2008-04-02 17:09:07.000000000 +0200
+++ new/URI-1.37/t/query.t 2008-06-12 16:09:55.000000000 +0200
@@ -1,6 +1,6 @@
#!perl -w
-print "1..18\n";
+print "1..23\n";
use strict;
use URI ();
@@ -80,6 +80,30 @@
print "not " unless "$u" =~ /^\?a=HASH\(/;
print "ok 18\n";
+$u->query_form(a => 1, b => 2, ';');
+print "not " unless $u eq "?a=1;b=2";
+print "ok 19\n";
+
+$u->query_form(a => 1, c => 2);
+print "not " unless $u eq "?a=1;c=2";
+print "ok 20\n";
+
+$u->query_form(a => 1, c => 2, '&');
+print "not " unless $u eq "?a=1&c=2";
+print "ok 21\n";
+
+$u->query_form([a => 1, b => 2], ';');
+print "not " unless $u eq "?a=1;b=2";
+print "ok 22\n";
+
+$u->query_form([]);
+{
+ local $URI::DEFAULT_QUERY_FORM_DELIMITER = ';';
+ $u->query_form(a => 1, b => 2);
+}
+print "not " unless $u eq "?a=1;b=2";
+print "ok 23\n";
+
__END__
# Some debugging while writing new tests
print "\@q='", join(":", @q), "'\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/URI/Heuristic.pm new/URI-1.37/URI/Heuristic.pm
--- old/URI-1.36/URI/Heuristic.pm 2008-04-02 23:24:00.000000000 +0200
+++ new/URI-1.37/URI/Heuristic.pm 2008-06-16 10:42:00.000000000 +0200
@@ -172,7 +172,7 @@
push(@guess, map { s/\bACME\b/$host/; $_ }
@special);
} else {
- push(@guess, 'www.$host.' . MY_COUNTRY());
+ push(@guess, "www.$host." . MY_COUNTRY());
}
}
push(@guess, map "www.$host.$_",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/URI/_query.pm new/URI-1.37/URI/_query.pm
--- old/URI-1.36/URI/_query.pm 2008-04-03 00:00:02.000000000 +0200
+++ new/URI-1.37/URI/_query.pm 2008-06-12 16:11:25.000000000 +0200
@@ -27,18 +27,20 @@
my $old = $self->query;
if (@_) {
# Try to set query string
- my @new = @_;
- if (@new == 1) {
- my $n = $new[0];
- if (ref($n) eq "ARRAY") {
- @new = @$n;
- }
- elsif (ref($n) eq "HASH") {
- @new = %$n;
- }
- }
+ my $delim;
+ my $r = $_[0];
+ if (ref($r) eq "ARRAY") {
+ $delim = $_[1];
+ @_ = @$r;
+ }
+ elsif (ref($r) eq "HASH") {
+ $delim = $_[1];
+ @_ = %$r;
+ }
+ $delim = pop if @_ % 2;
+
my @query;
- while (my($key,$vals) = splice(@new, 0, 2)) {
+ while (my($key,$vals) = splice(@_, 0, 2)) {
$key = '' unless defined $key;
$key =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg;
$key =~ s/ /+/g;
@@ -50,12 +52,21 @@
push(@query, "$key=$val");
}
}
- $self->query(@query ? join('&', @query) : undef);
+ if (@query) {
+ unless ($delim) {
+ $delim = $1 if $old && $old =~ /([&;])/;
+ $delim ||= $URI::DEFAULT_QUERY_FORM_DELIMITER || "&";
+ }
+ $self->query(join($delim, @query));
+ }
+ else {
+ $self->query(undef);
+ }
}
return if !defined($old) || !length($old) || !defined(wantarray);
return unless $old =~ /=/; # not a form
map { s/\+/ /g; uri_unescape($_) }
- map { /=/ ? split(/=/, $_, 2) : ($_ => '')} split(/&/, $old);
+ map { /=/ ? split(/=/, $_, 2) : ($_ => '')} split(/[&;]/, $old);
}
# Handle ...?dog+bones type of query
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.36/URI.pm new/URI-1.37/URI.pm
--- old/URI-1.36/URI.pm 2008-04-03 00:21:40.000000000 +0200
+++ new/URI-1.37/URI.pm 2008-06-16 10:55:47.000000000 +0200
@@ -2,9 +2,9 @@
use strict;
use vars qw($VERSION);
-$VERSION = "1.36";
+$VERSION = "1.37";
-use vars qw($ABS_REMOTE_LEADING_DOTS $ABS_ALLOW_RELATIVE_SCHEME);
+use vars qw($ABS_REMOTE_LEADING_DOTS $ABS_ALLOW_RELATIVE_SCHEME $DEFAULT_QUERY_FORM_DELIMITER);
my %implements; # mapping from scheme to implementor class
@@ -586,10 +586,16 @@
=item $uri->query_form( $key1 => $val1, $key2 => $val2, ... )
+=item $uri->query_form( $key1 => $val1, $key2 => $val2, ..., $delim )
+
=item $uri->query_form( \@key_value_pairs )
+=item $uri->query_form( \@key_value_pairs, $delim )
+
=item $uri->query_form( \%hash )
+=item $uri->query_form( \%hash, $delim )
+
Sets and returns query components that use the
I format. Key/value pairs are
separated by "&", and the key is separated from the value by a "="
@@ -614,6 +620,13 @@
$uri->query_form([ foo => [1, 2] ]);
$uri->query_form({ foo => [1, 2] });
+The $delim parameter can be passed as ";" to force the key/value pairs
+to be delimited by ";" instead of "&" in the query string. This
+practice is often recommened for URLs embedded in HTML or XML
+documents as this avoids the trouble of escaping the "&" character.
+You might also set the $URI::DEFAULT_QUERY_FORM_DELIMITER variable to
+";" for the same global effect.
+
The CURI::QueryParam module can be loaded to add further methods to
manipulate the form of a URI. See LURI::QueryParam for details.
@@ -958,6 +971,11 @@
URI->new("../../../foo")->abs("http://host/a/b")
==> "http://host/foo"
+=item $URI::DEFAULT_QUERY_FORM_DELIMITER
+
+This value can be set to ";" to have the query form C pairs
+delimited by ";" instead of "&" which is the default.
+
=back
=head1 BUGS
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org