Skip Menu |

This queue is for tickets about the Devel-hdb CPAN distribution.

Report information
The Basics
Id: 96852
Status: resolved
Priority: 0/
Queue: Devel-hdb

People
Owner: BRUMMETT [...] cpan.org
Requestors: public [...] khwilliamson.com
Cc:
AdminCc:

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



Subject: Broken in Perl v5.21+
Date: Mon, 30 Jun 2014 21:44:25 -0600
To: bug-Devel-hdb [...] rt.cpan.org
From: Karl Williamson <public [...] khwilliamson.com>
Perl v5.21 has changed the behavior of regular expression patterns. This distribution has one that, as a result, no longer works. It is in the test file 07-stack.t: like($frame_filename, qr(\(eval \d+\)[$escaped_filename:\d+]), "Filename stack frame $i"); The problem is that the pattern's delimiters are (), and there are also occurrences of () within the pattern, escaped by preceding them by backslashes. Until v5.21, those backslashes were effectively ignored, so the interior () were read as a grouping to enable one to extract $1 from the match, if desired. Until 5.18, this ignoring the backslashes was done silently. In 5.18 and 5.20, deprecation messages are raised to warn you that this behavior is about to change in 5.21+. Going forward the backslashes are not ignored, but are used to make the interior () match as literal left- and right- parentheses. I would have submitted a patch, but I don't know what was intended here. It's very unlikely that this pattern matches what was intended. It looks like the match is supposed to include the filename followed by a colon followed by some digits. However, since this is all enclosed in square brackets, what is actually matched by this portion of the pattern is a single character. It could be a colon, or a 'd' or a + or any of the characters in the filename. But it is just a single character, and not the whole filename. This doesn't look right. So I am leaving it to you to fix it to your specifications. You can add the statement use re qw(Debug COMPILE); just before the regex (or any regex) to see what it actually compiles into. Karl Williamson
On Mon Jun 30 23:44:41 2014, public@khwilliamson.com wrote: Show quoted text
> Perl v5.21 has changed the behavior of regular expression patterns. > This distribution has one that, as a result, no longer works. It is in > the test file 07-stack.t: > > like($frame_filename, qr(\(eval \d+\)[$escaped_filename:\d+]), > "Filename stack frame $i"); > > [...] > > I would have submitted a patch, but I don't know what was intended here.
It's supposed to match against a string that looks like (eval 123)[/path/to/some/file:456] Looking at it now, I'm surprised it works at all without escaping the square brackets. In any case, I've fixed it and uploaded a new version 0.13 to CPAN. Thanks for the report.
Looks like 0.13 is passing on cpan testers. I'm going to call this one done.
Fixed in 0.13