Hello community,
here is the log from the commit of package perl-URI
checked in at Thu Apr 10 11:34:36 CEST 2008.
--------
--- perl-URI/perl-URI.changes 2006-01-25 21:40:01.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-URI/perl-URI.changes 2008-04-09 13:57:14.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Apr 9 13:46:46 CEST 2008 - anicka@suse.cz
+
+- update to 1.36
+ * Escape Unicode strings as UTF-8.
+ * fixed URL encoded data: URLs
+ * uri_escape_utf8() now exported by default as documented.
+ * Test fails with Business::ISBN installed
+ * lc(undef) reports warning in blead
+ * add some tests for gopher URIs
+
+-------------------------------------------------------------------
Old:
----
URI-1.35-path.diff
URI-1.35.tar.bz2
New:
----
URI-1.36-path.diff
URI-1.36.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-URI.spec ++++++
--- /var/tmp/diff_new_pack.Q30504/_old 2008-04-10 11:34:05.000000000 +0200
+++ /var/tmp/diff_new_pack.Q30504/_new 2008-04-10 11:34:05.000000000 +0200
@@ -1,25 +1,24 @@
#
-# spec file for package perl-URI (Version 1.35)
+# spec file for package perl-URI (Version 1.36)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
+
Name: perl-URI
-Version: 1.35
+Version: 1.36
Release: 1
-Provides: perl_uri
-Obsoletes: perl_uri
Requires: perl = %{perl_version}
-Autoreqprov: on
+AutoReqProv: on
Group: Development/Libraries/Perl
License: Artistic License
-URL: http://cpan.org/modules/by-module/URI
+Url: http://cpan.org/modules/by-module/URI
Summary: Perl Interface for URI Objects
Source: URI-%{version}.tar.bz2
Patch: URI-%{version}-path.diff
@@ -42,10 +41,11 @@
perl Makefile.PL
make
touch OFFLINE
+
+%check
make test
%install
-rm -rf $RPM_BUILD_ROOT
%perl_make_install
%perl_process_packlist
@@ -61,56 +61,64 @@
%{perl_vendorarch}/auto/URI
/var/adm/perl-modules/%{name}
-%changelog -n perl-URI
-* Wed Jan 25 2006 - mls@suse.de
+%changelog
+* Wed Apr 09 2008 anicka@suse.cz
+- update to 1.36
+ * Escape Unicode strings as UTF-8.
+ * fixed URL encoded data: URLs
+ * uri_escape_utf8() now exported by default as documented.
+ * Test fails with Business::ISBN installed
+ * lc(undef) reports warning in blead
+ * add some tests for gopher URIs
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Thu Feb 17 2005 - mjancar@suse.cz
+* Thu Feb 17 2005 mjancar@suse.cz
- update to 1.35
-* Wed Nov 24 2004 - ro@suse.de
+* Wed Nov 24 2004 ro@suse.de
- disable remote connecting test
-* Mon Sep 20 2004 - ro@suse.de
+* Mon Sep 20 2004 ro@suse.de
- update to 1.33 to make it build again
-* Fri Aug 06 2004 - mjancar@suse.cz
+* Fri Aug 06 2004 mjancar@suse.cz
- update to 1.31
-* Thu Feb 26 2004 - mjancar@suse.cz
+* Thu Feb 26 2004 mjancar@suse.cz
- update to 1.30
-* Thu Oct 30 2003 - mjancar@suse.cz
+* Thu Oct 30 2003 mjancar@suse.cz
- update to 1.27
-* Fri Aug 22 2003 - mjancar@suse.cz
+* Fri Aug 22 2003 mjancar@suse.cz
- require the perl version we build with
-* Tue Jul 15 2003 - mjancar@suse.cz
+* Tue Jul 15 2003 mjancar@suse.cz
- adapt to perl-5.8.1
- use %%perl_process_packlist
-* Mon Jun 09 2003 - mjancar@suse.cz
+* Mon Jun 09 2003 mjancar@suse.cz
- don't package MANIFEST
-* Mon May 19 2003 - ro@suse.de
+* Mon May 19 2003 ro@suse.de
- remove perllocal.pod
-* Mon Apr 28 2003 - mjancar@suse.cz
+* Mon Apr 28 2003 mjancar@suse.cz
- update to version 1.23
-* Thu Oct 03 2002 - prehak@suse.cz
+* Thu Oct 03 2002 prehak@suse.cz
- updated to version 1.22
- removed perl-MIME-Base64 from neededforbuild
-* Mon Jul 29 2002 - mls@suse.de
+* Mon Jul 29 2002 mls@suse.de
- Fixed neededforbuild for perl-5.8.0
-* Mon Jul 22 2002 - prehak@suse.cz
+* Mon Jul 22 2002 prehak@suse.cz
- update to version 1.20
-* Tue Jul 02 2002 - mls@suse.de
+* Tue Jul 02 2002 mls@suse.de
- remove race in .packlist generation
-* Mon Jan 14 2002 - rvasice@suse.cz
+* Mon Jan 14 2002 rvasice@suse.cz
- update to version 1.18
-* Wed Aug 15 2001 - rvasice@suse.cz
+* Wed Aug 15 2001 rvasice@suse.cz
- update to version 1.15
-* Wed Mar 14 2001 - cihlar@suse.cz
+* Wed Mar 14 2001 cihlar@suse.cz
- update to version 1.11
-* Tue Nov 14 2000 - cihlar@suse.cz
+* Tue Nov 14 2000 cihlar@suse.cz
- renamed perl_uri -> perl-URI
-* Tue Aug 22 2000 - cihlar@suse.cz
+* Tue Aug 22 2000 cihlar@suse.cz
- update to 1.09
- bzipped sources
-* Mon Aug 21 2000 - ro@suse.de
+* Mon Aug 21 2000 ro@suse.de
- adapted for perl-5.6
-* Fri Mar 31 2000 - cihlar@suse.cz
+* Fri Mar 31 2000 cihlar@suse.cz
- added BuildRoot
- added manpages to files
-* Fri Mar 17 2000 - ug@suse.de
+* Fri Mar 17 2000 ug@suse.de
- build for IMap Server CD
++++++ URI-1.35-path.diff -> URI-1.36-path.diff ++++++
++++++ URI-1.35.tar.bz2 -> URI-1.36.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/Changes new/URI-1.36/Changes
--- old/URI-1.35/Changes 2004-11-05 15:16:54.000000000 +0100
+++ new/URI-1.36/Changes 2008-04-03 00:30:51.000000000 +0200
@@ -1,3 +1,21 @@
+2008-04-03 Gisle Aas
+
+ Release 1.36
+
+ : Escape Unicode strings as UTF-8.
+
+ Bjoern Hoehrmann : fixed URL encoded data: URLs
+
+ GAAS: uri_escape_utf8() now exported by default as documented.
+
+ BDFOY: Test fails with Business::ISBN installed [RT#33220]
+
+ JDHEDDEN: lc(undef) reports warning in blead [RT#32742]
+
+ GEOFFR: add some tests for gopher URIs [RT#29211]
+
+
+
2004-11-05 Gisle Aas
Release 1.35
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/MANIFEST new/URI-1.36/MANIFEST
--- old/URI-1.35/MANIFEST 2004-10-05 10:42:44.000000000 +0200
+++ new/URI-1.36/MANIFEST 2008-04-03 00:40:29.000000000 +0200
@@ -54,11 +54,13 @@
rfc2396.txt
t/abs.t
t/clone.t
+t/cwd.t
t/data.t
t/escape.t
t/file.t
t/ftp.t
t/generic.t
+t/gopher.t
t/heuristic.t
t/http.t
t/ldap.t
@@ -89,4 +91,6 @@
t/storable-test.pl
t/urn-isbn.t
t/urn-oid.t
+t/utf8.t
uri-test
+META.yml Module meta-data (added by MakeMaker)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/META.yml new/URI-1.36/META.yml
--- old/URI-1.35/META.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/URI-1.36/META.yml 2008-04-03 00:40:29.000000000 +0200
@@ -0,0 +1,12 @@
+--- #YAML:1.0
+name: URI
+version: 1.36
+abstract: ~
+license: ~
+generated_by: ExtUtils::MakeMaker version 6.3201
+distribution_type: module
+requires:
+ MIME::Base64: 2
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/README new/URI-1.36/README
--- old/URI-1.35/README 2003-10-07 11:06:15.000000000 +0200
+++ new/URI-1.36/README 2008-04-03 00:19:35.000000000 +0200
@@ -23,7 +23,7 @@
comp.lang.perl.modules USENET Newsgroup. Bug reports and suggestions
for improvements can be sent to the mailing list.
-Copyright 1998-2003 Gisle Aas.
+Copyright 1998-2004,2008 Gisle Aas.
Copyright 1998 Graham Barr.
This library is free software; you can redistribute it and/or modify
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/cwd.t new/URI-1.36/t/cwd.t
--- old/URI-1.35/t/cwd.t 1970-01-01 01:00:00.000000000 +0100
+++ new/URI-1.36/t/cwd.t 2008-04-02 20:45:25.000000000 +0200
@@ -0,0 +1,11 @@
+#!perl -Tw
+
+use Test;
+
+plan tests => 1;
+
+use URI::file;
+
+my $cwd = eval { URI::file->cwd };
+ok($@, '');
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/data.t new/URI-1.36/t/data.t
--- old/URI-1.35/t/data.t 2003-08-05 17:27:49.000000000 +0200
+++ new/URI-1.36/t/data.t 2008-04-02 20:41:43.000000000 +0200
@@ -9,7 +9,7 @@
exit;
}
-print "1..21\n";
+print "1..22\n";
use URI;
@@ -106,3 +106,5 @@
print "not " unless $old eq "" && $u eq "data:bar%2Cb%E5z,new";
print "ok 21\n";
+print "not " unless URI->new('data:;base64,%51%6D%70%76%5A%58%4A%75')->data eq "Bjoern";
+print "ok 22\n";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/file.t new/URI-1.36/t/file.t
--- old/URI-1.35/t/file.t 2004-09-07 10:53:22.000000000 +0200
+++ new/URI-1.36/t/file.t 2008-04-02 20:45:25.000000000 +0200
@@ -1,4 +1,4 @@
-#!perl -w
+#!perl -Tw
use URI::file;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/gopher.t new/URI-1.36/t/gopher.t
--- old/URI-1.35/t/gopher.t 1970-01-01 01:00:00.000000000 +0100
+++ new/URI-1.36/t/gopher.t 2008-04-02 20:16:47.000000000 +0200
@@ -0,0 +1,46 @@
+#!perl -w
+use strict;
+
+print "1..48\n";
+
+use URI;
+
+my $t = 1;
+sub is {
+ my ($exp, $got) = @_;
+ if (!defined $exp) {
+ print "not " if defined $got;
+ }
+ else {
+ print "not " unless $got eq $exp;
+ }
+ print "ok " . ($t++) . "\n";
+}
+
+sub check_gopher_uri {
+ my ($u, $exphost, $expport, $exptype, $expselector, $expsearch) = @_;
+ is("gopher", $u->scheme);
+ is($exphost, $u->host);
+ is($expport, $u->port);
+ is($exptype, $u->gopher_type);
+ is($expselector, $u->selector);
+ is($expsearch, $u->search);
+}
+
+my $u;
+$u = URI->new("gopher://host");
+check_gopher_uri($u, "host", 70, 1);
+$u = URI->new("gopher://host:70");
+check_gopher_uri($u, "host", 70, 1);
+$u = URI->new("gopher://host:70/");
+check_gopher_uri($u, "host", 70, 1);
+$u = URI->new("gopher://host:70/1");
+check_gopher_uri($u, "host", 70, 1);
+$u = URI->new("gopher://host:70/1");
+check_gopher_uri($u, "host", 70, 1);
+$u = URI->new("gopher://host:123/7foo");
+check_gopher_uri($u, "host", 123, 7, "foo");
+$u = URI->new("gopher://host/7foo\tbar%20baz");
+check_gopher_uri($u, "host", 70, 7, "foo", "bar baz");
+$u = URI->new("gopher://host/7foo%09bar%20baz");
+check_gopher_uri($u, "host", 70, 7, "foo", "bar baz");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/rel.t new/URI-1.36/t/rel.t
--- old/URI-1.35/t/rel.t 2003-07-23 06:51:07.000000000 +0200
+++ new/URI-1.36/t/rel.t 2008-04-02 23:39:08.000000000 +0200
@@ -1,21 +1,21 @@
#!/usr/bin/perl -w
-print "1..4\n";
+use Test;
+
+plan tests => 6;
use strict;
use URI;
-my $uri = URI->new("http://www.example.com/foo/bar/");
-
-print "not " unless $uri->rel("http://www.example.com/foo/bar/") eq "./";
-print "ok 1\n";
-
-print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/foo/bar/") eq "./";
-print "ok 2\n";
-
-print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM/FOO/BAR/") eq "../../foo/bar/";
-print "ok 3\n";
+my $uri;
-print "not " unless $uri->rel("HTTP://WWW.EXAMPLE.COM:80/foo/bar/") eq "./";
-print "ok 4\n";
+$uri = URI->new("http://www.example.com/foo/bar/");
+ok($uri->rel("http://www.example.com/foo/bar/"), "./");
+ok($uri->rel("HTTP://WWW.EXAMPLE.COM/foo/bar/"), "./");
+ok($uri->rel("HTTP://WWW.EXAMPLE.COM/FOO/BAR/"), "../../foo/bar/");
+ok($uri->rel("HTTP://WWW.EXAMPLE.COM:80/foo/bar/"), "./");
+
+$uri = URI->new("http://www.example.com/foo/bar");
+ok($uri->rel("http://www.example.com/foo/bar"), "bar");
+ok($uri->rel("http://www.example.com/foo"), "foo/bar");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/urn-isbn.t new/URI-1.36/t/urn-isbn.t
--- old/URI-1.35/t/urn-isbn.t 2003-10-03 14:27:18.000000000 +0200
+++ new/URI-1.36/t/urn-isbn.t 2008-04-02 23:46:27.000000000 +0200
@@ -25,13 +25,13 @@
print "not " unless $u->isbn eq "0-395-36341-1";
print "ok 3\n";
-print "not " unless $u->isbn_country_code == 0;
+print "not " unless $u->isbn_group_code == 0;
print "ok 4\n";
print "not " unless $u->isbn_publisher_code == 395;
print "ok 5\n";
-print "not " unless $u->isbn_as_ean eq "9780395363416";
+print "not " unless $u->isbn13 eq "9780395363416";
print "ok 6\n";
print "not " unless $u->nss eq "0395363411";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/t/utf8.t new/URI-1.36/t/utf8.t
--- old/URI-1.35/t/utf8.t 1970-01-01 01:00:00.000000000 +0100
+++ new/URI-1.36/t/utf8.t 2008-04-03 00:00:02.000000000 +0200
@@ -0,0 +1,15 @@
+#!perl
+
+use strict;
+use warnings;
+
+use utf8;
+
+use Test::More 'no_plan';
+use URI;
+
+is(URI->new('http://foobar/mooi€e')->as_string, 'http://foobar/mooi%E2%82%ACe');
+
+my $uri = URI->new('http:');
+$uri->query_form("mooi€e" => "mooi€e");
+is( $uri->query, "mooi%E2%82%ACe=mooi%E2%82%ACe" );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/data.pm new/URI-1.36/URI/data.pm
--- old/URI-1.35/URI/data.pm 2004-01-14 14:33:44.000000000 +0100
+++ new/URI-1.36/URI/data.pm 2008-04-02 20:41:43.000000000 +0200
@@ -55,7 +55,8 @@
$self->opaque("$enc,$new");
}
return unless defined wantarray;
- return $base64 ? decode_base64($data) : uri_unescape($data);
+ $data = uri_unescape($data);
+ return $base64 ? decode_base64($data) : $data;
}
# I could not find a better way to interpolate the tr/// chars from
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/Escape.pm new/URI-1.36/URI/Escape.pm
--- old/URI-1.35/URI/Escape.pm 2004-11-05 14:58:31.000000000 +0100
+++ new/URI-1.36/URI/Escape.pm 2008-04-03 00:00:02.000000000 +0200
@@ -1,7 +1,3 @@
-#
-# $Id: Escape.pm,v 3.28 2004/11/05 13:58:31 gisle Exp $
-#
-
package URI::Escape;
use strict;
@@ -147,9 +143,9 @@
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(uri_escape uri_unescape);
-@EXPORT_OK = qw(%escapes uri_escape_utf8);
-$VERSION = sprintf("%d.%02d", q$Revision: 3.28 $ =~ /(\d+)\.(\d+)/);
+@EXPORT = qw(uri_escape uri_unescape uri_escape_utf8);
+@EXPORT_OK = qw(%escapes);
+$VERSION = "3.29";
use Carp ();
@@ -215,4 +211,8 @@
$str;
}
+sub escape_char {
+ return join '', @URI::Escape::escapes{$_[0] =~ /(\C)/g};
+}
+
1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/file/Base.pm new/URI-1.36/URI/file/Base.pm
--- old/URI-1.35/URI/file/Base.pm 2004-09-07 10:34:36.000000000 +0200
+++ new/URI-1.36/URI/file/Base.pm 2008-04-03 00:00:02.000000000 +0200
@@ -16,7 +16,7 @@
if (defined $auth) {
$auth =~ s,%,%25,g unless $escaped_auth;
- $auth =~ s,([/?\#]),$URI::Escape::escapes{$1},g;
+ $auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg;
$auth = "//$auth";
if (defined $path) {
$path = "/$path" unless substr($path, 0, 1) eq "/";
@@ -28,7 +28,7 @@
$auth = "";
}
- $path =~ s,([%;?]),$URI::Escape::escapes{$1},g unless $escaped_path;
+ $path =~ s,([%;?]), URI::Escape::escape_char($1),eg unless $escaped_path;
$path =~ s/\#/%23/g;
my $uri = $auth . $path;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/file/Mac.pm new/URI-1.36/URI/file/Mac.pm
--- old/URI-1.35/URI/file/Mac.pm 2004-09-07 10:34:36.000000000 +0200
+++ new/URI-1.36/URI/file/Mac.pm 2008-04-03 00:00:02.000000000 +0200
@@ -25,7 +25,7 @@
}
my $isdir = ($path =~ s/:$//);
- $path =~ s,([%/;]),$URI::Escape::escapes{$1},g;
+ $path =~ s,([%/;]), URI::Escape::escape_char($1),eg;
my @path = split(/:/, $path, -1);
for (@path) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/file.pm new/URI-1.36/URI/file.pm
--- old/URI-1.35/URI/file.pm 2004-09-07 14:26:51.000000000 +0200
+++ new/URI-1.36/URI/file.pm 2008-04-02 23:25:57.000000000 +0200
@@ -5,7 +5,7 @@
require URI::_generic;
@ISA = qw(URI::_generic);
-$VERSION = sprintf("%d.%02d", q$Revision: 4.19 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "4.20";
use URI::Escape qw(uri_unescape);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/_generic.pm new/URI-1.36/URI/_generic.pm
--- old/URI-1.35/URI/_generic.pm 2003-07-24 01:45:54.000000000 +0200
+++ new/URI-1.36/URI/_generic.pm 2008-04-03 00:00:02.000000000 +0200
@@ -22,7 +22,7 @@
$$self = $1;
my $rest = $3;
if (defined $auth) {
- $auth =~ s/([^$ACHAR])/$URI::Escape::escapes{$1}/go;
+ $auth =~ s/([^$ACHAR])/ URI::Escape::escape_char($1)/ego;
$$self .= "//$auth";
}
_check_path($rest, $$self);
@@ -41,7 +41,7 @@
my $rest = $3;
my $new_path = shift;
$new_path = "" unless defined $new_path;
- $new_path =~ s/([^$PCHAR])/$URI::Escape::escapes{$1}/go;
+ $new_path =~ s/([^$PCHAR])/ URI::Escape::escape_char($1)/ego;
_check_path($new_path, $$self);
$$self .= $new_path . $rest;
}
@@ -58,7 +58,7 @@
my $rest = $3;
my $new_path = shift;
$new_path = "" unless defined $new_path;
- $new_path =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
+ $new_path =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego;
_check_path($new_path, $$self);
$$self .= $new_path . $rest;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/Heuristic.pm new/URI-1.36/URI/Heuristic.pm
--- old/URI-1.35/URI/Heuristic.pm 2004-01-14 14:33:44.000000000 +0100
+++ new/URI-1.36/URI/Heuristic.pm 2008-04-02 23:24:00.000000000 +0200
@@ -1,7 +1,5 @@
package URI::Heuristic;
-# $Id: Heuristic.pm,v 4.17 2004/01/14 13:33:44 gisle Exp $
-
=head1 NAME
URI::Heuristic - Expand URI using heuristics
@@ -89,7 +87,7 @@
require Exporter;
*import = \&Exporter::import;
@EXPORT_OK = qw(uf_uri uf_uristr uf_url uf_urlstr);
-$VERSION = sprintf("%d.%02d", q$Revision: 4.17 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "4.18";
sub MY_COUNTRY() {
for ($MY_COUNTRY) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/mailto.pm new/URI-1.36/URI/mailto.pm
--- old/URI-1.35/URI/mailto.pm 1998-09-11 11:54:04.000000000 +0200
+++ new/URI-1.36/URI/mailto.pm 2008-04-02 20:32:26.000000000 +0200
@@ -14,7 +14,7 @@
my @new = @old;
# get rid of any other to: fields
for (my $i = 0; $i < @new; $i += 2) {
- if (lc($new[$i]) eq "to") {
+ if (lc($new[$i] || '') eq "to") {
splice(@new, $i, 2);
redo;
}
@@ -51,7 +51,7 @@
# strip out any "to" fields
my @to;
for (my $i=0; $i < @new; $i += 2) {
- if (lc($new[$i]) eq "to") {
+ if (lc($new[$i] || '') eq "to") {
push(@to, (splice(@new, $i, 2))[1]); # remove header
redo;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/_query.pm new/URI-1.36/URI/_query.pm
--- old/URI-1.35/URI/_query.pm 2004-04-06 11:36:53.000000000 +0200
+++ new/URI-1.36/URI/_query.pm 2008-04-03 00:00:02.000000000 +0200
@@ -13,7 +13,7 @@
my $q = shift;
$$self = $1;
if (defined $q) {
- $q =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
+ $q =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego;
$$self .= "?$q";
}
$$self .= $3;
@@ -40,12 +40,12 @@
my @query;
while (my($key,$vals) = splice(@new, 0, 2)) {
$key = '' unless defined $key;
- $key =~ s/([;\/?:@&=+,\$\[\]%])/$URI::Escape::escapes{$1}/g;
+ $key =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg;
$key =~ s/ /+/g;
$vals = [ref($vals) eq "ARRAY" ? @$vals : $vals];
for my $val (@$vals) {
$val = '' unless defined $val;
- $val =~ s/([;\/?:@&=+,\$\[\]%])/$URI::Escape::escapes{$1}/g;
+ $val =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg;
$val =~ s/ /+/g;
push(@query, "$key=$val");
}
@@ -67,7 +67,7 @@
# Try to set query string
my @copy = @_;
@copy = @{$copy[0]} if @copy == 1 && ref($copy[0]) eq "ARRAY";
- for (@copy) { s/([;\/?:@&=+,\$\[\]%])/$URI::Escape::escapes{$1}/g; }
+ for (@copy) { s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; }
$self->query(@copy ? join('+', @copy) : undef);
}
return if !defined($old) || !defined(wantarray);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/sip.pm new/URI-1.36/URI/sip.pm
--- old/URI-1.35/URI/sip.pm 2004-06-03 15:21:40.000000000 +0200
+++ new/URI-1.36/URI/sip.pm 2008-04-03 00:00:02.000000000 +0200
@@ -30,7 +30,7 @@
$$self = defined($1) ? $1 : "";
my $rest = $3;
if (defined $auth) {
- $auth =~ s/([^$URI::uric])/$URI::Escape::escapes{$1}/go;
+ $auth =~ s/([^$URI::uric])/ URI::Escape::escape_char($1)/ego;
$$self .= "$auth";
}
$$self .= $rest;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/Split.pm new/URI-1.36/URI/Split.pm
--- old/URI-1.35/URI/Split.pm 2004-01-14 14:33:44.000000000 +0100
+++ new/URI-1.36/URI/Split.pm 2008-04-03 00:00:02.000000000 +0200
@@ -18,7 +18,7 @@
my $uri = defined($scheme) ? "$scheme:" : "";
$path = "" unless defined $path;
if (defined $auth) {
- $auth =~ s,([/?\#]),$URI::Escape::escapes{$1},g;
+ $auth =~ s,([/?\#]), URI::Escape::escape_char($1),eg;
$uri .= "//$auth";
$path = "/$path" if length($path) && $path !~ m,^/,;
}
@@ -26,12 +26,12 @@
$uri .= "//"; # XXX force empty auth
}
unless (length $uri) {
- $path =~ s,(:),$URI::Escape::escapes{$1}, while $path =~ m,^[^:/?\#]+:,;
+ $path =~ s,(:), URI::Escape::escape_char($1),e while $path =~ m,^[^:/?\#]+:,;
}
- $path =~ s,([?\#]),$URI::Escape::escapes{$1},g;
+ $path =~ s,([?\#]), URI::Escape::escape_char($1),eg;
$uri .= $path;
if (defined $query) {
- $query =~ s,(\#),$URI::Escape::escapes{$1},g;
+ $query =~ s,(\#), URI::Escape::escape_char($1),eg;
$uri .= "?$query";
}
$uri .= "#$frag" if defined $frag;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI/urn/isbn.pm new/URI-1.36/URI/urn/isbn.pm
--- old/URI-1.35/URI/urn/isbn.pm 2002-07-06 18:43:14.000000000 +0200
+++ new/URI-1.36/URI/urn/isbn.pm 2008-04-02 23:46:13.000000000 +0200
@@ -4,9 +4,17 @@
@ISA=qw(URI::urn);
use strict;
-use Business::ISBN ();
-
+use Carp qw(carp);
+BEGIN {
+ require Business::ISBN;
+
+ local $^W = 0; # don't warn about dev versions, perl5.004 style
+ warn "Using Business::ISBN version " . Business::ISBN->VERSION .
+ " which is deprecated.\nUpgrade to Business::ISBN version 2\n"
+ if Business::ISBN->VERSION < 2;
+ }
+
sub _isbn {
my $nss = shift;
$nss = $nss->nss if ref($nss);
@@ -35,14 +43,50 @@
return $isbn->publisher_code;
}
+BEGIN {
+my $group_method = do {
+ local $^W = 0; # don't warn about dev versions, perl5.004 style
+ Business::ISBN->VERSION >= 2 ? 'group_code' : 'country_code';
+ };
+
+sub isbn_group_code {
+ my $isbn = shift->_isbn || return undef;
+ return $isbn->$group_method;
+}
+}
+
sub isbn_country_code {
+ my $name = (caller(0))[3]; $name =~ s/.*:://;
+ carp "$name is DEPRECATED. Use isbn_group_code instead";
+
+ no strict 'refs';
+ &isbn_group_code;
+}
+
+BEGIN {
+my $isbn13_method = do {
+ local $^W = 0; # don't warn about dev versions, perl5.004 style
+ Business::ISBN->VERSION >= 2 ? 'as_isbn13' : 'as_ean';
+ };
+
+sub isbn13 {
my $isbn = shift->_isbn || return undef;
- return $isbn->country_code;
+
+ # Business::ISBN 1.x didn't put hyphens in the EAN, and it was just a string
+ # Business::ISBN 2.0 doesn't do EAN, but it does ISBN-13 objects
+ # and it uses the hyphens, so call as_string with an empty anon array
+ # or, adjust the test and features to say that it comes out with hyphens.
+ my $thingy = $isbn->$isbn13_method;
+ return eval { $thingy->can( 'as_string' ) } ? $thingy->as_string([]) : $thingy;
+}
}
sub isbn_as_ean {
- my $isbn = shift->_isbn || return undef;
- return $isbn->as_ean;
+ my $name = (caller(0))[3]; $name =~ s/.*:://;
+ carp "$name is DEPRECATED. Use isbn13 instead";
+
+ no strict 'refs';
+ &isbn13;
}
sub canonical {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/URI-1.35/URI.pm new/URI-1.36/URI.pm
--- old/URI-1.35/URI.pm 2004-11-05 15:17:33.000000000 +0100
+++ new/URI-1.36/URI.pm 2008-04-03 00:21:40.000000000 +0200
@@ -2,7 +2,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = "1.35"; # $Date: 2004/11/05 14:17:33 $
+$VERSION = "1.36";
use vars qw($ABS_REMOTE_LEADING_DOTS $ABS_ALLOW_RELATIVE_SCHEME);
@@ -73,7 +73,8 @@
{
my $class = shift;
my($str, $scheme) = @_;
- $str =~ s/([^$uric\#])/$URI::Escape::escapes{$1}/go;
+ # find all funny characters and encode the bytes.
+ $str =~ s*([^$uric\#])* URI::Escape::escape_char($1) *ego;
$str = "$scheme:$str" unless $str =~ /^$scheme_re:/o ||
$class->_no_scheme_ok;
my $self = bless \$str, $class;
@@ -204,7 +205,7 @@
my $new_opaque = shift;
$new_opaque = "" unless defined $new_opaque;
- $new_opaque =~ s/([^$uric])/$URI::Escape::escapes{$1}/go;
+ $new_opaque =~ s/([^$uric])/ URI::Escape::escape_char($1)/ego;
$$self = defined($old_scheme) ? $old_scheme : "";
$$self .= $new_opaque;
@@ -229,7 +230,7 @@
my $new_frag = shift;
if (defined $new_frag) {
- $new_frag =~ s/([^$uric])/$URI::Escape::escapes{$1}/go;
+ $new_frag =~ s/([^$uric])/ URI::Escape::escape_char($1) /ego;
$$self .= "#$new_frag";
}
$old;
@@ -907,7 +908,8 @@
Numbers (ISBNs) and is described in RFC 3187. A C<URI> object belonging
to this namespace has the following extra methods (if the
Business::ISBN module is available): $uri->isbn,
-$uri->isbn_publisher_code, $uri->isbn_country_code, $uri->isbn_as_ean.
+$uri->isbn_publisher_code, $uri->isbn_group_code (formerly isbn_country_code,
+which is still supported by issues a deprecation warning), $uri->isbn_as_ean.
=item B<urn>:B<oid>:
@@ -995,7 +997,7 @@
=head1 COPYRIGHT
-Copyright 1995-2003 Gisle Aas.
+Copyright 1995-2004,2008 Gisle Aas.
Copyright 1995 Martijn Koster.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org