Re: Revert use_ok() change to allow lexical effects?

Leon Timmermans <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <CAHhgV8ibcpoW=N-MVcR0CSRUgZ5S+b=GqLZS+zRjCiYnejzWvA@mail.gmail.com>
On Wed, Apr 11, 2012 at 4:22 PM, Ovid <[email protected]> wrote:
>         my @modules = qw(
>           Test::Trap::Builder::TempFile
>           Test::Trap::Builder::SystemSafe
>           Test::Trap::Builder
>           Test::Trap
>         );
>         push @modules => 'Test::Trap::Builder::PerlIO' if eval "use PerlIO; 1";
>         plan tests => scalar @modules;

I don't think that «if eval "use PerlIO; 1"» logic makes much sense.
It should return true on any perl 5.8+, even without PerlIO support
(not that you want to support that). If you must, use
$Config{useperlio}.

Leon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.