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

Re: maint-5.10 snapshot (aka "RC0")

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
July 8, 2009 00:55
Subject:
Re: maint-5.10 snapshot (aka "RC0")
Message ID:
b77c1dce0907080055k714fbc81sd1c229a804a8492f@mail.gmail.com
2009/7/8 Paul Johnson <paul@pjcj.net>:
> On Tue, Jul 07, 2009 at 11:18:49PM +0100, Tom Hukins wrote:
>> On Wed, Jul 08, 2009 at 12:09:41AM +0200, Vincent Pit wrote:
>> > got a few failures : Devel::Cover, Math::Pari, PerlMagick, JSON::DWIW. I
>> > can't say if they are regressions from 5.10.0 yet.
>>
>> Devel::Cover has failed against maint-5.10 for a few months now.  I
>> got in touch with Paul, its author, to let him know about this.  The
>> module's tests fail due to something different that Perl does with its
>> code internally (sorry, I don't understand the details) but the module
>> itself works fine.
>
> Yes, a test is failing because the optree has changed somewhat and the
> Deparse code I nicked doesn't know about that.  I assume that Deparse
> itself has been updated so I just need to nick the updated code.
> (There's that word again - "just".)
>
> Of course the real solution is to refactor Deparse so I don't need to
> nick its code, I can just call it.

There's a rough API to call Deparse however.

>  I don't have time for that.  I'm not
> sure whether I have time to fix up Devel::Cover properly before Dave
> gets 5.10.1 out of the door, but I'll make sure that there's a
> Devel::Cover available that doesn't fail its tests before that happens,
> one way or another.
>
> The failure mode is that "$a && $b" is displayed as "do { $b if $a }",
> or something very similar.

Maybe this optimisation :

[rafael@scipion ~]$ perl5.10.0 -MO=Deparse -e 'if(not $a or not $b){}'
if (not $a or not $b) {
    ();
}
-e syntax OK
[rafael@scipion ~]$ bleadperl -MO=Deparse -e 'if(not $a or not $b){}'
unless ($a and $b) {
    ();
}
-e syntax OK

Which seems to come from :

commit edbe35ea95baf286c38bf4d7db7d18b82ecce254
Author: Vincent Pit <perl@profvince.com>
Date:   Sat Aug 30 00:47:28 2008 +0200

    Re: unless(...) terser than if(!...)
    Message-ID: <48B86060.4090905@profvince.com>

    p4raw-id: //depot/perl@34310

Not sure Deparse will be able to cope with this.

Thread Previous | 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