develooper Front page | perl.perl5.porters | Postings from July 2012

DAVEM TPF Grant June 2012 report

Thread Next
From:
Dave Mitchell
Date:
July 6, 2012 09:43
Subject:
DAVEM TPF Grant June 2012 report
Message ID:
20120706164332.GG3041@iabyn.com
As per my grant conditions, here is a report for the June period.

This month saw the final merging of my re_eval branch back into
blead, and incorporated in the 5.17.1 release. This consisted of about 125
commits, spread out over a year. The remainder of the month was spent
fixing some of the issues thrown up by the new implementation.

Some highlights of the new /(?{})/ implementation are:

=item *

Code blocks within patterns are now parsed in the same pass as the
surrounding code; in particular it is no longer necessary to have balanced
braces: this now works:

    /(?{  $x='{'  })/

This means that this error message is longer generated:

    Sequence (?{...}) not terminated or not {}-balanced in regex

but a new error may be seen:

    Sequence (?{...}) not terminated with ')'

In addition, literal code blocks within run-time patterns are only
compiled once, at perl compile-time:

    for my $p (...) {
	# this 'FOO' block of code is compiled once, at the same time as
	# the surrounding 'for' loop
	/$p{(?{FOO;})/;
    }

=item *

Lexical variables are now sane as regards scope, recursion and closure
behaviour. In particular, C</A(?{B})C/> behaves (from a closure viewpoint)
exactly like C</A/ && do { B } && /C/>, while  C<qr/A(?{B})C/> is like
C<sub {/A/ && do { B } && /C/}>. So this code now works how you might
expect, creating three regexes that match 1,2, and 3:

    for my $i (0..2) {
	push @r, qr/^(??{$i})$/;
    }
    "1" =~ $r[1]; # matches

=item *

The C<use re 'eval'> pragma is now strictly only required for code blocks
defined at runtime; in particular in the following, the text of the $r
pattern is still interpolated into the new pattern and recompiled, but
the individual compiled code-blocks within $r are reused rather than being
recompiled, and C<use re 'eval'> isn't needed any more:

    my $r = qr/abc(?{....})def/;
    /xyz$r/;

=item *

Flow control operators no longer crash. Each code block runs in a new
dynamic scope, so C<next> etc. will not see any enclosing loops and
C<caller> will not see any calling subroutines. C<return> returns a value
from the code block, not from any enclosing subroutine.

---

Over the last month I have averaged 15 hours per week.

As of 2012/06/31: since the beginning of the grant:

 120.9 weeks
1300.0 total hours
  10.8 average hours per week

There are now 0 hours left on the grant (but the grant has just been
extended :-)

---
  
Report for period 2012/06/01 to 2012/06/30 inclusive

SUMMARY
-------

    Effort (HH::MM):

       23:50 diagnosing bugs
       39:03 fixing bugs
        0:00 reviewing other people's bug fixes
        0:00 reviewing ticket histories
        0:00 review the ticket queue (triage)
       -----
       62:53 TOTAL

    Numbers of tickets closed:

           4 tickets closed that have been worked on
           0 tickets closed related to bugs that have been fixed
           0 tickets closed that were reviewed but not worked on (triage)
       -----
           4 TOTAL

[actually, an additional 25 tickets were closed, but I forgot to update my
automatic log]

SHORT DETAIL
------------

 8:42 [perl #3634] Capture corruption through self-modying regexp (?{...})
36:41 [perl #34161] METABUG - (?{...}) and (??{...}) regexp issues
 4:25 [perl #113670] Bleadperl v5.17.0-451-gf6033a9 breaks SBECK/Date-Manip-6.32.tar.gz
 2:00 [perl #113676] Bleadperl v5.17.0-383-g9f14173 breaks PARDUS/File-MimeInfo/File-MimeInfo-0.16.tar.gz
10:05 [perl #113682] Bleadperl v5.17.0-424-gd24ca0c breaks ABIGAIL/Regexp-Common-2011121001.tar.gz
 1:00 [perl #113720] perl dumping core in regex et al(mem corruption?)

-- 
Monto Blanco... scorchio!

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About