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