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.