Skip Menu |

This queue is for tickets about the HTML-FormFu CPAN distribution.

Report information
The Basics
Id: 57390
Status: resolved
Priority: 0/
Queue: HTML-FormFu

People
Owner: Nobody in particular
Requestors: ntyni [...] iki.fi
Cc: dam [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.06001
Fixed in: (no value)



Subject: Move away from Regexp-Copy, broken on 5.12.0
Hi, as you may have noticed, test reports of HTML-FormFu are scarce on Perl 5.12.0. This is because of [rt.cpan.org #33531]: Regexp-Copy does not pass its test suite on 5.12.0. As Regexp-Copy has not been updated since 2003, it may well be the case that it will not be fixed at all. Perhaps HTML-FormFu could be updated to use something else with similar functionality? FWIW, HTML-FormFu is the only package that depends on Regexp-Copy in Debian. A related perl5-porters thread can be found at http://www.nntp.perl.org/group/perl.perl5.porters/2010/05 /msg159912.html and the corresponding Debian bug is at http://bugs.debian.org/580328 Many thanks for your work, -- Niko Tyni (Debian Perl group) ntyni@debian.org
From: ntyni [...] iki.fi
On Tue May 11 17:27:52 2010, ntyni@iki.fi wrote: Show quoted text
> as you may have noticed, test reports of HTML-FormFu are scarce on Perl > 5.12.0. > > This is because of [rt.cpan.org #33531]: Regexp-Copy does not pass its > test suite on 5.12.0. > > As Regexp-Copy has not been updated since 2003, it may well be the case > that it will not be fixed at all. Perhaps HTML-FormFu could be updated > to use something else with similar functionality?
I see Regexp::Copy is only used to get Storable to support qr// objects. I don't think this is achievable with the Perl 5.12 qr// implementation without patching Storable itself. Also, it looks like Storable is mostly needed for its dclone() function. There's similar functionality in the Clone module, and Storable::dclone is allegedly "slower, but more flexible". As an experiment, I naively replaced all uses of Storable::dclone() with Clone::clone(), and removed the 'use Regexp::Copy' line from lib/HTML/FormFu.pm. The test suite now passes for me on both 5.10.1 and 5.12.0. I'm attaching the (very straightforward) patch. This looks like an easy solution, but I'm not sure if the uses of Storable::nfreeze() and Storable::thaw() in HTML::FormFu::MultiForm and HTML::FormFu::UploadParam can ever encounter qr// objects. The test suite clearly doesn't cover such a case. FWIW, this issue is one of the few blockers for Debian switching to Perl 5.12. I'd appreciate it very much if you could consider the feasibility of the above solution, or if you have some other suggestions. Again, many thanks for your work on HTML-FormFu. -- Niko Tyni (Debian Perl group) ntyni@debian.org PS: there seems to be a typo in lib/HTML/FormFu/MultiForm.pm: $Storable::canonicle should probably be $Storable::canonical? PPS: the LIMITATIONS section in the POD doc of lib/HTML/FormFu/Constraint/Callback.pm refers to problems with Storable::dclone() and closures. It looks like Clone::clone() might handle closures better.
Subject: 0001-Drop-Regexp-Copy-dependency-by-switching-from-Storab.patch

Message body is not shown because it is too large.

thanks - I've applied the patch, and will push out a new CPAN release soon.
Subject: Re: [rt.cpan.org #57390] Move away from Regexp-Copy, broken on 5.12.0
Date: Mon, 17 May 2010 12:06:20 +0300
To: Carl Franks via RT <bug-HTML-FormFu [...] rt.cpan.org>
From: Niko Tyni <ntyni [...] iki.fi>
On Sun, May 16, 2010 at 11:30:03AM -0400, Carl Franks via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=57390 > > > thanks - I've applied the patch, and will push out a new CPAN release soon.
Thanks for the quick action on this! 0.07001 is looking great otherwise, but you probably want to remove Regexp::Copy from META.yml and Makefile.PL too. Sorry, I could have included those in my patch. -- Niko Tyni ntyni@debian.org