Skip Menu |

This queue is for tickets about the Lexical-SealRequireHints CPAN distribution.

Report information
The Basics
Id: 125176
Status: open
Priority: 0/
Queue: Lexical-SealRequireHints

People
Owner: Nobody in particular
Requestors: cpan [...] aaroncrane.co.uk
Cc: gregoa [...] cpan.org
AdminCc:

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



Subject: Test failure under recent blead
As of Perl 5.27.11, Unicode property tests in regexes very rarely invoke the swash mechanism. This causes tests to fail. The attached patch changes the test suite so that, on a sufficiently recent Perl, we use one of the few Unicode property tests that does invoke the swash mechanism. Thanks.
Subject: lexical_sealrequirehints_5_28.diff
Binary files Lexical-SealRequireHints-0.011.orig/t/.swash.t.swp and Lexical-SealRequireHints-0.011/t/.swash.t.swp differ diff -urN Lexical-SealRequireHints-0.011.orig/t/swash.t Lexical-SealRequireHints-0.011/t/swash.t --- Lexical-SealRequireHints-0.011.orig/t/swash.t 2017-07-15 22:56:08.000000000 +0200 +++ Lexical-SealRequireHints-0.011/t/swash.t 2018-04-22 15:08:14.000000000 +0200 @@ -44,8 +44,13 @@ # is the execution. Hence for this test we must arrange for # both to occur between the surrounding segments of test code. # A BEGIN block achieves this nicely. - my $x = "foo\x{666}"; - $x =~ /foo\p{Alnum}/; + # + # From Perl 5.27.11 onwards, far fewer properties cause the swash + # mechanism to be invoked. One option is an nv property in + # non-canonical form, but nv properties don't work in older Perls. + my ($x, $prop) = "$]" >= 5.027011 ? ("foo\x{be}", '\p{nv=0.75}') + : ("foo\x{666}", '\p{Alnum}'); + $x =~ /foo$prop/; } BEGIN { ok exists($INC{"utf8.pm"});
On Sun Apr 22 09:14:35 2018, ARC wrote: Show quoted text
> As of Perl 5.27.11, Unicode property tests in regexes very rarely > invoke the swash mechanism. This causes tests to fail. > > The attached patch changes the test suite so that, on a sufficiently > recent Perl, we use one of the few Unicode property tests that does > invoke the swash mechanism. > > Thanks.
Zefram, It would be appreciated if you applied the patch submitted by Aaron Crane and released a new version of Lexical-SealRequireHints to CPAN. I have tried this patch on both Linux and FreeBSD. In both cases, './Build test' now PASSes on all test files. Applying this patch will enable Lexical-SealRequireHints's reverse dependencies to become testable against perl-5.28.0-RC* releases. Thank you very much. Jim Keenan
The patch is (at least currently) not needed as the issue is bein workarounded in perl core. Cf. https://rt.perl.org/Public/Bug/Display.html?id=133135 and https://perl5.git.perl.org/perl.git/commitdiff/3cacfe74edaec4b2b1289e9809e4e68a2bf5b851 (To the contrary, the tests break under 5.30 _with_ this patch. That's how we noticed this in Debian ...) Cheers, gregor