New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confused regex parsing of lists #6993
Comments
From @AbigailCreated by @Abigail $ perl -wle '($a, $b) =~ (0, 0)' This message is confusing because perldiag doesn't mention Perldiag lists it under: =item Too many arguments for %s (F) The function requires fewer arguments than you specified. which is a generic entry, with an explaination that doesn't add Perl Info
|
From enache@rdslink.roOn Fri, Aug 15, 2003 a.d., abigail@abigail.nl (via RT) wrote:
'internal reset' is an OP (Perl_pp_regcreset, look at opcode.pl:492). IMHO, even 'Too many arguments for regcreset' would be less confusing. Regards, |
From @rgsEnache Adrian wrote:
Yes ; but on the other hand, why does this code produce a syntax error ? |
From enache@rdslink.roOn Sat, Aug 16, 2003 a.d., Rafael Garcia-Suarez wrote:
...
Because Perl_ck_fun <censored> :-) push /^-/ ? @opts : @args, $_; Regard, |
From perl-5.8.0@ton.iguana.beCreated by perl-5.8.0@ton.iguana.beEither me or perl is hopelessly confused here: perl -cwle 's!.!""=~((),$&)!eg' The Deparse looks rather unexpected too: BEGIN { $^W = 1; } (the $& doesn't go with the regex bind anymore) Perl Info
|
From enache@rdslink.roOn Sat, Dec 20, 2003 a.d., Ton Hospel wrote:
Your recent [perl #24689] is the same as [perl 23328]. push /yes/ ? @yes : @no, $_; As nobody was enthousiastic about having that fixed, I forgot about it :-) You have also some reports about regexp blowing the stack. Notice that simply I'll go there for reducing somehow the overhead of the regex functions - Regards, |
From enache@rdslink.roOn Sat, Dec 20, 2003 a.d., I wrote:
|
From perl5-porters@ton.iguana.beIn article <20031220190203.GA1264@ratsnest.hole>,
Ah indeed.
Mm, but a distributed push like that is currently invalid perl syntax,
Must be incredibly greedy then, since I can blow it up with what a naive Notice also #22095 where i get a "expected" stack coredump since I suppose Is there maybe some huge automatic variable that gets allocated at each
|
From @chornySame cryptic error on 5.12.0. On Fri Aug 15 05:06:11 2003, abigail@abigail.nl wrote:
Discussion here: http://rt.perl.org/rt3/Ticket/Display.html?id=24689 -- |
From [Unknown Contact. See original ticket]Same cryptic error on 5.12.0. On Fri Aug 15 05:06:11 2003, abigail@abigail.nl wrote:
Discussion here: http://rt.perl.org/rt3/Ticket/Display.html?id=24689 -- |
From @khwilliamsonOn Tue May 18 14:07:44 2010, chorny wrote:
These no longer generate these error messages. Is there any reason to -- |
From @nwc10On Sat, Jan 26, 2013 at 09:42:28AM -0800, Karl Williamson via RT wrote:
A bisect shows that it was fixed by this commit: commit 74529a4 add Perl_re_op_compile function embed.fnc | 2 + 1) It's not clear *why* this fixes it It would be nice to resolve both before closing. (more generally, it makes me wonder how many long standing open tickets have Nicholas Clark |
From @jkeenanOn Sat Jan 26 09:42:28 2013, khw wrote:
I'm a bit puzzled. With Perl 5.16.0, I get: ##### ... on both Darwin/PPC and Linux/i386. With blead (This is perl 5, version 17, subversion 9 (v5.17.9 ##### Does the presence of these latter, more familiar, warnings mean that the Thank you very much. |
From @nwc10On Sat, Jan 26, 2013 at 11:34:34AM -0800, James E Keenan via RT wrote:
As I noted in the other message, the change comes with commit 74529a4 Hence I'm confident to say that it fixes the *symptoms*. I'm not confident to Nicholas Clark |
From @iabynOn Sat, Jan 26, 2013 at 06:12:46PM +0000, Nicholas Clark wrote:
Actually, the bug is still present, but has metastasised. The regcreset op is not normally present any more; it's been re-purposed So you can still get the old bug as follows (make it taint and runtime): $ ./perl -T -e'""=~ ($a,$b)' But without the taint, there's some emergent behaviour, due to the way regcomp('a' . $b) to regcomp('a', $b) Using a list on the RHS of the bind allows you to expose this new =~ ("a", "b", "c") is compile-time treated as =~ "abc" while =~ ($a, $b, $c) is run-time treated as =~ $c So there are some inconsistencies here that need ironing out. We'll need to decide whether =~(X,Y,Z) should resolve to =~Z or =~X.Y.Z; -- |
From @arcDave Mitchell <davem@iabyn.com> wrote:
I think it would be much more predictable for it to resolve to =~Z — -- |
From @demerphqOn Tue Jan 29 08:54:33 2013, davem wrote:
Just a ping about this issue. We still have it in latest perl 12 years later. Perhaps the least we could do is provide a better error message? Yves |
Suggest a better message and I will implement it |
Migrated from rt.perl.org#24689 (status was 'open')
Searchable as RT24689$
The text was updated successfully, but these errors were encountered: