in reply to Re: Test::Prereq difficulties
in thread Test::Prereq difficulties

Why does it need -MTest::More on the command line? It doesn't seem to be used in the module anywhere and even if it was, you could just do use Test::More inside the module. I tried it without and it worked fine.

While I'm at, why not add

sub import { prereq_ok() if (caller())[1] eq '-'; }
that way someone could just do
perl -MTest::Prereq

Useful module (not overkill :)

Replies are listed 'Best First'.
Re^3: Test::Prereq difficulties
by brian_d_foy (Abbot) on Mar 09, 2005 at 05:39 UTC

    You're right: that Test::More is superfluous. I don't know what I was thinking then, but it doesn't make sense to me anymore. I've taken that out completely and fixed up the docs.

    I like the idea of running the test if the module is used from the command line, but it feels slightly odd and anti-DWIM to me. Maybe it won't feel so weird when I upload the next version.

    Thanks :)

    --
    brian d foy <bdfoy@cpan.org>
      It is a little odd. The only other place I've seen it used was in Parse::RecDescent. At the time I didn't understand how it was doing it and just assumed it was some deep Damien magic.