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
Regexp::Grammars broken since 5.17.1 #12787
Comments
From andrew@cleverdomain.orgCreated by andrew@cleverdomain.orgThis is a bug report for perl from andrew@cleverdomain.org, ----------------------------------------------------------------- Regexp::Grammars works by using overload::constant qr to bless all qr's in I'm not sure if this is to be considered a bug in perl, or if the *previous* Thanks, Andrew Perl Info
|
From arodland@cpan.orgThe commit message for e03b874 makes me |
From [Unknown Contact. See original ticket]The commit message for e03b874 makes me |
From @jkeenanOn Sun Feb 17 22:07:37 2013, andrew@cleverdomain.org wrote:
We need to investigate the issues which Andrew has raised, as this |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Sun, Feb 17, 2013 at 10:07:37PM -0800, Andrew Rodland wrote:
Given that Regexp/Grammars.pm is 6000+ lines of code, is it possible to Thanks. -- |
From arodland@cpan.orgOn Sat Mar 02 16:38:19 2013, davem wrote:
I distilled it down as far as I could in the attached file. Here's a perl-5.14.1ok 1 - It matches perl-5.16.2ok 1 - It matches perl-5.16.2@ssok 1 - It matches perl-5.17.0ok 1 - It matches perl-5.17.1Eval-group not allowed at runtime, use re 'eval' in regex m/(?{ perl-5.17.8Eval-group not allowed at runtime, use re 'eval' in regex m/(?{ |
From arodland@cpan.orgOn Sat Mar 02 19:26:20 2013, arodland wrote:
Interestingly, Adding "use re 'eval'" doesn't suppress the error, no |
From @iabynOn Sat, Mar 02, 2013 at 07:26:21PM -0800, Andrew Rodland via RT wrote:
Thanks for the reduced test case. My preliminary analysis is that 1) the test script (and thus presumably Regexp::Grammars) only worked 2) but looking at ways in which Regexp::Grammars should be modifiable to The basic issue is this line in the q{""} overload method: return '(?{ this is basically creating an arbitrary string at run-time, which is return '(?{ $RGP::Success = 1 })' . and when run as: perl5162 -w ~/tmp/rgtest.pl '(?{ system "echo hacked"})' you get: hacked which shows that perl is executing code in arbitrary run-time strings The basic rule for 5.17.1 onwards is that literal text containing (?{}) $x = "foo"; $x =~ /(?{ print "boo\n" })$x/; while other things that were lax have been stiffened. However, I would expect something like the following *should* work and be use re 'eval'; return qr/(?{ And as you pointed out, a 'use re eval' even in the scope of the main -- |
From zefram@fysh.orgDave Mitchell wrote:
The qr constant overloading behaves in a rather strange way, compared to You'd think you could avoid this problem by making R:G return a compiled I reckon the qr constant overload should be allowed to return a compiled -zefram |
From @iabynOn Wed, Mar 27, 2013 at 10:58:23AM +0000, Zefram wrote:
Yes, that's exactly what I've been working on for the last week. -- |
From @iabynOn Sun, Mar 10, 2013 at 12:48:16AM +0000, Dave Mitchell wrote:
The branch smoke-me/davem/re_overload, currently being smoked and shortly If the following change is made to your test script: Inline Patch--- /tmp/rgtest.pl.orig 2013-04-11 10:28:53.879421869 +0100
+++ /tmp/rgtest.pl 2013-04-11 10:31:57.510778815 +0100
@@ -18,7 +18,7 @@
package RGP;
use overload q{""} => sub {
my $re = shift;
- return '(?{ $RGP::Success = 1 })' . $$re;
+ return qr/(?{ $RGP::Success = 1 })$$re/;
}, fallback => 1;
}
- return '(?{ which is harmless, but unnecessary after my fix to blead. I haven't tried fixing up Regex::Grammars to see if it works, since it's -- |
From zefram@fysh.orgDave Mitchell wrote:
It only needs a qr// once, at the top level. -zefram |
From @iabynOn Thu, Apr 11, 2013 at 10:39:26AM +0100, Dave Mitchell wrote:
And now in blead with commit -- |
@iabyn - Status changed from 'open' to 'resolved' |
From @rjbs* Dave Mitchell <davem@iabyn.com> [2013-04-12T10:57:15]
I'm delighted, thanks Dave! -- |
From @hroncokWhy is this marked as solved? I cannot run Regexp::Grammars in 5.18. commit c3923c3 reparse compile-time /(?{})/ in right scope <http://www.nntp.perl.org/group/perl.perl5.porters/2013/07/msg205393.htm commit c30fc27 Handle /[#]/ and /[(?#]/ with code blocks Is there a fix somewhere present and I just don't see it? Thanks |
From [Unknown Contact. See original ticket]Why is this marked as solved? I cannot run Regexp::Grammars in 5.18. commit c3923c3 reparse compile-time /(?{})/ in right scope <http://www.nntp.perl.org/group/perl.perl5.porters/2013/07/msg205393.htm commit c30fc27 Handle /[#]/ and /[(?#]/ with code blocks Is there a fix somewhere present and I just don't see it? Thanks |
From @LeontOn Wed, Oct 16, 2013 at 4:37 PM, Miro Hron�ok via RT <
CPAN Testers is all green on 5.18.1, as well as 5.19.2+. Are you sure Leon |
Migrated from rt.perl.org#116823 (status was 'resolved')
Searchable as RT116823$
The text was updated successfully, but these errors were encountered: