# New Ticket Created by David Golden # Please include the string: [perl #123698] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=123698 > 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.Thread Previous