develooper Front page | perl.perl5.porters | Postings from September 2008

Re: [perl #41572][PATCH] Subclassing CGI::Pretty dies in ->new

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
September 8, 2008 12:32
Subject:
Re: [perl #41572][PATCH] Subclassing CGI::Pretty dies in ->new
Message ID:
20080908193223.GJ75181@plum.flirble.org
On Mon, Sep 08, 2008 at 10:04:03AM -0400, Lincoln Stein wrote:
> Unfortunately this patch breaks the pretty.t regression tests. Exported
> functions, such as h1(), no longer export. I am working on fixing this now.
> 
> Yesterday's patch from Renee to fix parameter processing, broke about 50% of
> the regression tests! Fortunately this was easy to fix.
> 
> Does anyone run the regression tests before accepting patches into core? I'd
> appreciate it if you perl5 porters could take CGI.pm upstream fixes only
> from CPAN so that we are in sync.

We've been trying very hard to keep core modules exactly in sync with CPAN, by
sending things upstream, and then waiting for them to come back. Which can be
a bit of a long wait with some dual life module authors, who are nowhere near
as responsive as you are.

Sometimes we forget (which happened once a few weeks ago with some change
for CGI.pm) but apart from that, changes sent to p5p for CGI.pm have been
sent to you (unless you were already on the Cc list).

And no, no-one commits changes unless they pass tests locally. Well, unless
they mess up (which I have once or twice by managing to run tests on a
different build tree from the one I was committing on)


Right now, blead is byte for byte identical with the modules in the CGI.pm
3.42 release. (And for our mutual sanity, long may it stay in sync)

I had already done a full diff before you sent this message that I am replying
to - it turns out that there are 3 differences in test scripts, two to do with
where a test file is. We're likely to move the location of CGI.pm in the
core tarball (into ext/) as part of a plan to make it easier to track dual-life
code, which would mean that these would change, so I was holding off sending
you a patch with the changes until that had happened.

I've appended the full test diff. The third change is an EBCDIC fix, made as
part of http://public.activestate.com/cgi-bin/perlbrowse/p/28568

Change 28568 by stevep@stevep-kirk on 2006/07/13 20:18:59

	Subject: [PATCH] z/OS: CPAN-ized ext/ and lib/
	From: Jarkko Hietaniemi <jhi@iki.fi>
	Date: Thu, 13 Jul 2006 23:10:27 +0300
	Message-ID: <44B6A8B3.5070605@iki.fi>


Nicholas Clark

diff -pru ../CGI.pm-3.42/t/upload.t lib/CGI/t/upload.t
--- ../CGI.pm-3.42/t/upload.t	2008-09-08 14:52:59.000000000 +0100
+++ lib/CGI/t/upload.t	2008-09-08 19:40:04.000000000 +0100
@@ -7,7 +7,17 @@
 
 # Due to a bug in older versions of MakeMaker & Test::Harness, we must
 # ensure the blib's are in @INC, else we might use the core CGI.pm
-use lib qw(. ./blib/lib ./blib/arch);
+
+my $test_file;
+if($ENV{PERL_CORE}) {
+   chdir 't';
+   @INC = '../lib';
+   use File::Spec ();
+   $test_file = File::Spec->catfile(qw(.. lib CGI t), "upload_post_text.txt");
+} else {
+   use lib qw(. ./blib/lib ./blib/arch);
+   $test_file = "t/upload_post_text.txt";
+}
 
 use strict;
 
@@ -67,7 +77,7 @@ my $q;
 
 {
     local *STDIN;
-    open STDIN, '<t/upload_post_text.txt'
+    open STDIN, "< $test_file"
         or die 'missing test file t/upload_post_text.txt';
     binmode STDIN;
     $q = CGI->new;
diff -pru ../CGI.pm-3.42/t/uploadInfo.t lib/CGI/t/uploadInfo.t
--- ../CGI.pm-3.42/t/uploadInfo.t	2008-09-08 14:52:59.000000000 +0100
+++ lib/CGI/t/uploadInfo.t	2008-09-08 19:40:49.000000000 +0100
@@ -7,7 +7,17 @@
 
 # Due to a bug in older versions of MakeMaker & Test::Harness, we must
 # ensure the blib's are in @INC, else we might use the core CGI.pm
-use lib qw(. ./blib/lib ./blib/arch);
+
+my $test_file;
+if($ENV{PERL_CORE}) {
+   chdir 't';
+   @INC = '../lib';
+   use File::Spec ();
+   $test_file = File::Spec->catfile(qw(.. lib CGI t), "upload_post_text.txt");
+} else {
+   use lib qw(. ./blib/lib ./blib/arch);
+   $test_file = "t/upload_post_text.txt";
+}
 
 use strict;
 
@@ -68,7 +78,7 @@ my $q;
 
 {
     local *STDIN;
-    open STDIN, '<t/upload_post_text.txt'
+    open STDIN, "< $test_file"
         or die 'missing test file t/upload_post_text.txt';
     binmode STDIN;
     $q = CGI->new;
diff -pru ../CGI.pm-3.42/t/util-58.t lib/CGI/t/util-58.t
--- ../CGI.pm-3.42/t/util-58.t	2003-04-14 19:32:22.000000000 +0100
+++ lib/CGI/t/util-58.t	2006-07-13 21:18:14.000000000 +0100
@@ -11,6 +11,11 @@ BEGIN {
 use Test::More tests => 2;
 use_ok("CGI::Util");
 my $uri = "\x{5c0f}\x{98fc} \x{5f3e}.txt"; # KOGAI, Dan, in Kanji
-is(CGI::Util::escape($uri), "%E5%B0%8F%E9%A3%BC%20%E5%BC%BE.txt",
-   "# Escape string with UTF-8 flag");
+if (ord('A') == 193) { # EBCDIC.
+    is(CGI::Util::escape($uri), "%FC%C3%A0%EE%F9%E5%E7%F8%20%FC%C3%C7%CA.txt",
+       "# Escape string with UTF-8 (UTF-EBCDIC) flag");
+} else {
+    is(CGI::Util::escape($uri), "%E5%B0%8F%E9%A3%BC%20%E5%BC%BE.txt",
+       "# Escape string with UTF-8 flag");
+}
 __END__

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About