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

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

Thread Previous | Thread Next
Ben Morrow
April 30, 2008 15:03
Re: [PATCH] testing $/ with in memory files
Message ID:

Quoth (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).


        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.                                          Frank Herbert, 'Dune'

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About