Skip Menu |

This queue is for tickets about the ParseLex CPAN distribution.

Report information
The Basics
Id: 73422
Status: resolved
Priority: 0/
Queue: ParseLex

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Bleadperl v5.15.5-422-g7d69d4a breaks PSCUST/ParseLex-2.20.tar.gz
Fixed upstream
As I noted in the perl ticket: This was a bug waiting to happen. Commit 7d69d4a61b happened to change the order in which keys came out of %::. So Parse::Trace, which goes iterating through the stash looking for a variable containing $self (for verbose output), happened to stumble across $^V, which has explosive overloaded methods. (I think version objects are very un-perlish in that regard, but I doubt I could convince the author of version.pm.) So it looks as though ParseLex needs to work around this, otherwise it’s just by chance that it passes its tests. Changing line 30 of Trace.pm from return $symbol if ($value eq $self); to return $symbol if eval { $value eq $self }; or return $symbol if ref $value eq ref $self && $value eq $self; should work. (Without benchmarking it, I think the latter would be faster.)
Resolved in ParseLex 2.21 by an alternative to the suggested: filter the keys of the stash to only check ($value eq $self) if the key does not contain any special characters: map { ... return $symbol if ($value eq $self); ... } grep {! /\W/} keys %{"${$pkg}::"}; Any comments on this solution?