develooper Front page | perl.perl5.porters | Postings from March 2011

[perl #87064] Semi-Semicolons test suite is broken since perl 5.13.7

Thread Next
From:
Father Chrysostomos via RT
Date:
March 27, 2011 13:03
Subject:
[perl #87064] Semi-Semicolons test suite is broken since perl 5.13.7
Message ID:
rt-3.6.HEAD-16385-1301256200-572.87064-15-0@perl.org
On Sat Mar 26 05:33:43 2011, slaven@rezic.de wrote:
> -----------------------------------------------------------------
> The problem is described in
> https://rt.cpan.org/Ticket/Display.html?id=66876
> 
> The author (MSCHWERN) suggests that the breakage could be caused
> by bleadperl and should be reported here.

This was caused by the following commit:

commit f07ec6dd59215a56bc1159449a9631be7a02a94d
Author: Zefram <zefram@fysh.org>
Date:   Wed Oct 13 19:05:19 2010 +0100

    remove filter inheritance option from lex_start
    
    The only uses of lex_start that had the new_filter parameter false,
    to make the new lexer context share source filters with the previous
    lexer context, were uses with rsfp null, which therefore never invoked
    source filters.  Inheriting source filters from a logically unrelated
    file seems like a silly idea anyway.

What’s happening is that Semi::Semicolons’ test suite is doing

BEGIN{ use_ok('Semi::Semicolons'); }

which enables the source filter for the rest of the test script.

Test::More implements use_ok with a ‘use’ statement inside a string
eval, so that line is a bit like:

BEGIN{ eval "use Semi::Semicolons" }

This now fails to activate the source filter because the eval and the
test script are no longer able to share the same source filter space.
When that commit messages says that ‘rsfp [was] null, which therefore
never invoked source filters’, it fails to take into account that, even
though source filters do not apply to string evals, they can still allow
filters to be propagated *back* to the real file currently being compiled.

To resolve this, either we can just revert that patch (which would be an
API change, since that commit came just a few commits before lex_start’s
being made public), or we can revert it, rename lex_start to something
else, and make a lex_start macro with the current API.


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