develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [PATCH] testing $/ with in memory files

Thread Previous | Thread Next
From:
Ben Morrow
Date:
April 30, 2008 15:03
Subject:
Re: [PATCH] testing $/ with in memory files
Message ID:
vr6ne5-p96.ln1@osiris.mauzo.dyndns.org

Quoth p5p@perl.wizbit.be (Bram):
> 
> Tested using:
>    make minitest
>    make test
>    ./perl t/base/rs.t
>    ./miniperl t/base/rs.t
> 
> 
> ./miniperl t/base/rs.t did had a problem with it because it,  
> obviously, does not set PERL_CORE_MINITEST.
> 
> To make it work I added:
>    if ($ENV{PERL_CORE_MINITEST} or $ENV{_} =~ m/miniperl/) {

Is $ENV{_} portable? I would have thought something like

    if (eval q/use PerlIO::scalar; 1/) {

would be safer, especially as it includes cases like non-PerlIO perls,
and statically-linked perls that don't have PerlIO::scalar linked in (if
such beasts exist).

Ben

-- 
        I must not fear. Fear is the mind-killer. I will face my fear and
        I will let it pass through me. When the fear is gone there will be 
        nothing. Only I will remain.
ben@morrow.me.uk                                          Frank Herbert, 'Dune'

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