Skip Menu |
Report information
Id: 128052
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: andy [at] hybridized.org
Cc: jdhedden [at] cpan.org
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: low
Type: unknown
Perl Version: (no value)
Fixed In: (no value)



Subject: threads-2.07 t/test.pl uses re::is_regexp() which requires 5.10+
CC: jdhedden [...] cpan.org
Download (untitled) / with headers
text/plain 247b
threads-2.07 on CPAN has this change to t/test.pl line 448: - unless (ref($expected) && ref($expected) =~ /Regexp/) { + unless (re::is_regexp($expected)) { This breaks the test on anything older than 5.10. The fix is just to revert this line.
RT-Send-CC: jdhedden [...] cpan.org, perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 597b
On Mon May 02 10:38:44 2016, andy@hybridized.org wrote: Show quoted text
> threads-2.07 on CPAN has this change to t/test.pl line 448: > > - unless (ref($expected) && ref($expected) =~ /Regexp/) { > + unless (re::is_regexp($expected)) { > > This breaks the test on anything older than 5.10. The fix is just to > revert this line.
I don't see any 'dist/threads/t/test.pl' in the Perl 5 core distribution. I do, however, see it in the CPAN distribution: http://cpansearch.perl.org/src/JDHEDDEN/threads-2.07/t/test.pl Jerry, can you look into this? Thank you very much. -- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 465b
When I sent this, I didn't fully understand how this dist was related to core, but in fact the file in question is t/test.pl in blead. In addition to the re::is_regexp issue, there is another issue in the same file where unpack 'W*' is used (line 299). bulk88 sent me this patch for it on IRC earlier to use U* instead of W* on Perls < 5.10: https://github.com/perl11/p5-Config/commit/d4fd527ff8393fe5c747a9330304e39e989b9885#diff-9608c9f2a031ad0f9b427c09e2c65bd5
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 912b
On Mon May 02 17:08:43 2016, andy@hybridized.org wrote: Show quoted text
> When I sent this, I didn't fully understand how this dist was related > to core, but in fact the file in question is t/test.pl in blead. In > addition to the re::is_regexp issue, there is another issue in the > same file where unpack 'W*' is used (line 299). bulk88 sent me this > patch for it on IRC earlier to use U* instead of W* on Perls < 5.10: > > https://github.com/perl11/p5- > Config/commit/d4fd527ff8393fe5c747a9330304e39e989b9885#diff- > 9608c9f2a031ad0f9b427c09e2c65bd5
Since threads.pm, a dual-life module, depends on test.pl, which exists for perl’s own testing purposes, it has to be included in the distribution for the tests to work. Hence, I think it would be good to keep perl’s test.pl 5.8-compatible as long as this arrangement exists. But patching test.pl can wait until after the release of 5.24. -- Father Chrysostomos
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 1.4k
On Mon May 02 18:00:07 2016, sprout wrote: Show quoted text
> On Mon May 02 17:08:43 2016, andy@hybridized.org wrote:
> > When I sent this, I didn't fully understand how this dist was related > > to core, but in fact the file in question is t/test.pl in blead. In > > addition to the re::is_regexp issue, there is another issue in the > > same file where unpack 'W*' is used (line 299). bulk88 sent me this > > patch for it on IRC earlier to use U* instead of W* on Perls < 5.10: > > > > https://github.com/perl11/p5- > > Config/commit/d4fd527ff8393fe5c747a9330304e39e989b9885#diff- > > 9608c9f2a031ad0f9b427c09e2c65bd5
> > Since threads.pm, a dual-life module, depends on test.pl, which exists > for perl’s own testing purposes, it has to be included in the > distribution for the tests to work. > > Hence, I think it would be good to keep perl’s test.pl 5.8-compatible > as long as this arrangement exists. But patching test.pl can wait > until after the release of 5.24.
This affects both 'threads' and 'threads::shared' and means the CPAN versions for both of these are 'broken'. My inclination is to release updated versions of these modules to CPAN to accommodate the fixes for both the regexp and pack problems mentioned. This would entail version bumps, of course. This would mean that the CPAN versions would be ahead of the 5.24 versions. Is this a problem? Additionally, for whoever 'fixes' t/test.pl, documentation should be added mentioning this matter and the need to keep t/test.pl compatible with Perl 5.8.
CC: Perl5 Porters <perl5-porters [...] perl.org>
To: James E Keenan via RT <perlbug-followup [...] perl.org>
Subject: Re: [perl #128052] threads-2.07 t/test.pl uses re::is_regexp() which requires 5.10+
From: Aaron Crane <arc [...] cpan.org>
Date: Mon, 16 May 2016 12:41:55 +0100
Download (untitled) / with headers
text/plain 1.5k
Jerry D. Hedden via RT <perlbug-followup@perl.org> wrote: Show quoted text
> On Mon May 02 18:00:07 2016, sprout wrote:
>> Since threads.pm, a dual-life module, depends on test.pl, which exists >> for perl’s own testing purposes, it has to be included in the >> distribution for the tests to work. >> >> Hence, I think it would be good to keep perl’s test.pl 5.8-compatible >> as long as this arrangement exists. But patching test.pl can wait >> until after the release of 5.24.
I've patched t/test.pl as of blead commit 94b9cb53c203ffad48e3011ea660a3a5ed9a2b38, and verified that it can run a simple test suite tickling both of the affected parts of test.pl under Perl 5.8; and I'm therefore closing this ticket. Show quoted text
> This affects both 'threads' and 'threads::shared' and means the CPAN versions for both of these are 'broken'. My inclination is to release updated versions of these modules to CPAN to accommodate the fixes for both the regexp and pack problems mentioned. This would entail version bumps, of course. This would mean that the CPAN versions would be ahead of the 5.24 versions. Is this a problem?
I don't think anyone's answered this question; I'm sorry about that. At this point, I believe t/test.pl can be imported into the CPAN versions of threads and threads::shared, to make their test suites work under 5.8. And AFAICT, it won't cause any problem for blead if you issue CPAN releases with the new version of test.pl (or with any other version, for that matter, because that file is explicitly excluded when reimporting the modules into blead). Thanks. -- Aaron Crane ** http://aaroncrane.co.uk/


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org