Skip Menu |

This queue is for tickets about the Regexp-Debugger CPAN distribution.

Report information
The Basics
Id: 91170
Status: resolved
Priority: 0/
Queue: Regexp-Debugger

People
Owner: Nobody in particular
Requestors: Smylers [...] stripey.com
Cc:
AdminCc:

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



Subject: Crash After End with /g: “Can't use an undefined value as an ARRAY reference”
Date: Wed, 4 Dec 2013 10:32:45 +0000
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Smylers <Smylers [...] stripey.com>
This crashes: $ perl -MRegexp::Debugger -E '($a = "aabbb") =~ s/b*$/c/g; say $a' Step through all the matches and off the end, and: Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.14.2/Regexp/Debugger.pm line 499. This is with Regexp::Debugger 0.001016. It seems to require the /g to crash like this. This variant also crashes, using m//g rather than s///g: $ perl -MRegexp::Debugger -E '$a = "aabbb"; 1 while $a =~ /b*$/g; say $a' I haven't attempted to narrow this down any further. Context: http://london.pm.org/pipermail/london.pm/Week-of-Mon-20131202/024650.html Cheers Smylers -- The UK gov's proposed gagging law will suppress protest and campaigning by charities and political groups. Read more: http://civilsocietycommission.info/ Please sign this petition: http://38d.gs/1cJ9ViA Oxfam • BHA • Quakers * Countryside Alliance • League Against Cruel Sports • CND
Subject: Re: [rt.cpan.org #91170] Crash After End with /g: “Can't use an undefined value as an ARRAY reference”
Date: Thu, 5 Dec 2013 10:45:50 +1100
To: bug-Regexp-Debugger [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Wow, that was an obscure bug (and quite a tricky edge-case to infer from within the regex itself). I just uploaded 0.001017, which now visualizes the correct behaviour and explains what's happening quite clearly (I hope!) Many thanks for the report, Damian