princepawn has asked for the wisdom of the Perl Monks concerning the following question:

without any alterations of PERL5LIB, or a use lib command, or an alteration of @INC, the make test attempts to use the module I am actually testing before installing:
BEGIN { $| = 1; print "1..2\n"; } END {print "not ok 1\n" unless $loaded;} use HTTP::File; $loaded = 1; print "ok 1\n";
that does not seem reasonable.

Replies are listed 'Best First'.
Re: how does use in make test work for a non-installed module
by takshaka (Friar) on May 27, 2000 at 02:24 UTC
    Note that 'make test' ne 'perl test.pl'.

    'make test' executes test.pl with the -I switch described by mikfire, which pushes onto @INC the blib/* directories created by 'make'.

Re: how does use in make test work for a non-installed module
by mikfire (Deacon) on May 27, 2000 at 00:18 UTC
    From perldoc perlrun
    -Idirectory Directories specified by -I are prepended to the search path for modules (@INC), and also tells the C preprocessor where to search for include files. The C preprocessor is invoked with -P; by default it searches /usr/include and /usr/lib/perl.
    Mik
    mikfire ( perlus bigotus maximus )
Re: how does use in make test work for a non-installed module
by KM (Priest) on May 26, 2000 at 23:58 UTC
    Well, you want to test the module before installing it. If it was to fail, why would you want to install it? How does this not seem reasonable? It works as advertised.

    Cheers,
    KM