On Sun Dec 05 03:50:40 2004, david@landgren.net wrote: > david@landgren.net (via RT) wrote: > > # New Ticket Created by david@landgren.net > > # Please include the string: [perl #32840] > > # in the subject line of all future correspondence about this issue. > > # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32840 > > > > [...] > > > > There do not appear to be any tests that check how $^R should > > behave. The following file is an attempt to improve matters. > > Late night bad wording. There are indeed tests for $^R in t/op/pat.t but > they don't exercise patterns with groupings. > > Playing around some more, the following match, but $^R does not contain > what is expected: > > $^R = undef; > ok( 'ac' =~ /^a(?{30})(?:b(?{31})|c(?{32}))?/, 'ac =~ a(?:b|c)?' ); > ok( $^R == 32, '$^R == 32' ); > > $^R = undef; > ok( 'abbb' =~ /^a(?{36})(?:b(?{37})|c(?{38}))+/, 'abbbb =~ a(?:b|c)+' ); > ok( $^R == 37, '$^R == 37' ) or print "# \$^R=$^R\n"; This bug has been merged with 36909, and has been resolved by patch #29308. The underlying issue was that CURLYX operands did a regcpblow() without taking measures to preserve $^R. The attached patch updates the tests in t/op/rxcode.t to remove todo's and add additional tests from your ticket. Cheers, YvesThread Previous