On Wed, Feb 18, 2009 at 6:37 PM, Ville Skyttä <ville.sky...@iki.fi> wrote:
> Hmm.  I can see how implementing this would make the test succeed, but I'm not
> sure if I'm quite happy with "fixing" it this way.  The checklink script
> has -T in its options so it would fail at runtime after "make install" if the
> user expects to be able to have something loaded from $PERL5LIB which isn't
> in the default @INC, no?  Having the test suite intentionally not reveal this
> problem doesn't sound like the right thing to do.  And if "make test" is run
> in an environment that differs from the installed one (except of course for
> the things required to make sure that the stuff tested is the stuff about to
> be installed, not a previous version of it possibly installed) so that
> despite this test failure, the script would work when installed, I tend to
> think that this would be a problem in the test environment.

That's a valid concern, though it's a bit different than what I
normally think a test is for.  The test phase happens before
installation, so it's never exactly the installed environment.  For
example, imagine that I had all your prereqs installed in the system
perl, and imagine that your checklib script actually needed some
functions or something defined in W3C::LinkChecker.  It would work in
testing because blib is added to @INC -- but it's not the final
location for installation so if I installed in in a local directory
that my PERL5LIB points to, then it would fail at runtime after
installation.  Maybe that's a bit contrived, but I hope you see what
I'm getting at.  Rather than being a test of functionality, you're
attempting to test for a sane environment to install into.

If that's what you're expecting to test, then FAIL is the right grade
for anyone that uses PERL5LIB to provide your prerequisites.  You'll
see a mixture of PASS and FAIL in the grades for this distribution and
that will warn users that there may be something special they'll have
to do to make it work.  You should probably document that the script
runs with the taint flag (technically, the shebang only works on *nix
like systems) and thus prerequisites can't be provided via PERL5LIB.

-- David

Reply via email to