CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 1873
content-type: text/html; charset=utf-8
last-modified: Mon, 13 Oct 2025 16:28:25 GMT
date: Mon, 13 Oct 2025 16:28:25 GMT
strict-transport-security: max-age=15768000
[perl #123698] 5.20 threaded regression: boolean.pm -truth option breaks string literals in closures - nntp.perl.org
Front page | perl.perl5.porters |
Postings from January 2015
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

[perl #123698] 5.20 threaded regression: boolean.pm -truth option breaks string literals in closures
Thread PreviousFrom:
Father Chrysostomos via RTDate:
January 31, 2015 22:12Subject:
[perl #123698] 5.20 threaded regression: boolean.pm -truth option breaks string literals in closuresMessage ID:
rt-4.0.18-26845-1422742342-941.123698-15-0@perl.orgOn Thu Jan 29 07:06:25 2015, dagolden@cpan.org wrote: > On Perl 5.20.X with threads, when boolean.pm uses the '-truth' option > on import -- which replaces the interpreter's internal true/false > values with boolean.pm objects -- we've seen a case where a string > literal in an anonymous function becomes undefined, but only if a > string assignment happens in the same function. > > The attached program demonstrates the issue. > > On Perl 5.18.2-threaded and Perl 5.20.0-not-threaded the output is: > calling not_broken: > what > calling broken: > what > > On Perl 5.20.0-threaded and 5.20.1-threaded, the output is: > calling not_broken: > what > calling broken: > Use of uninitialized value0 in print at boolean-broken.pl line 12. > > Discovered and discussed in these Github issues: > * https://github.com/Test-More/test-more/issues/546 > * https://github.com/ingydotnet/boolean-pm/issues/8 > > While the change in 5.21.5 to prevent unlocking read-only values > (which is what boolean.pm relies on) prevents boolean.pm from doing > this trick, that the problem appears unreleated to true/false values, > only affects threaded 5.20.X and occurs in such a peculiar > circumstance suggests that there might be a deeper bug worth > investigating. > > My perl -V output is attached. I tried rigging the latest bleadperl locally to allow PL_sv_yes and PL_sv_no to be modified, and your example script worked. Is it worth pursuing this to see when the problem emerged and when it disappeared? -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=123698Thread Previous
- Re: [perl #123698] 5.20 threaded regression: boolean.pm -truth optionbreaks string literals in closures by David Golden
- [perl #123698] 5.20 threaded regression: boolean.pm -truth option breaks string literals in closures by James E Keenan via RT
- [perl #123698] 5.20 threaded regression: boolean.pm -truth option breaks string literals in closures by Father Chrysostomos via RT
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About