On Fri, Feb 23, 2007 at 01:43:31PM +0200, Vladimir Poroshin wrote:

> CQL::Parser is mentioned in the PREREQUISITES part. So it should be 
> installed autmatically during the installation of Alvis-QueryFilter module.
> I wonder why have you got "/QueryFilter....Can't locate CQL/Parser.pm in 
> @INC ..." error?

It's a bit complicated, but I think I've figgered it out.  Details
below.

> Can you provide more datails about this testing?

Every night I run a script which finds a list of all the distributions
uploaded to the CPAN the previous day.  I then run:
  .../perl-$version/bin/perl -MCPAN -e 'install("$distribution")'
for two different versions of perl on Linux and one on OpenBSD (I'll add
more platforms later as well).  At the start of each test run, the
perl-$version directory is extracted from a tarball of a clean, virgin
freshly-compiled perl with no extra modules installed.  Then when
testing and installing your distribution, I follow and install (if
possible) the pre-requisites.

In your case, I did install the pre-reqs, and I can see that CQL::Parser
passed its tests OK, and got installed *for the version of perl I use in
testing*.

Then in your test suite, I ran t/QueryFilter.t, which fork()ed and
exec()ed bin/run_QF.pl.  That script, however, has a shebang line
#!/usr/bin/perl which is not the build of perl that I'd installed your
pre-reqs for.  It in turn knew where to find Alvis::QueryFilter under my
.../.cpan directory (cos CPAN.pm sets $ENV{PERL5LIB} during testing) but
couldn't find CQL::Parser because I'd not installed that for OpenBSD's
own version of perl.

Consequently, run_QF.pl spat an error, which the test suite picked up.

This is *not* just a problem that arises because of the way I'm testing.
It can, for example, also occur if someone is installing your module
using their own /usr/local/bin/perl, or /opt/perl/bin/perl, or anything
that's not /usr/bin/perl.

Thankfully, the fix is easy.  You should be able to change run_QF.pl to
get rid of the shebang line and instead exec() it like:

    exec("$^X -w bin/runQF.pl --testquery t/test");

$^X is one of perl's magic internal variables, and gives you the full
path and name for the interpreter.

I hope that helps.  If you upload a new version to the CPAN then I
should pick it up within a day or so and test it again.  I only notify
authors of failures, so please check the cpan-testers mailing list
archive for the email saying that it PASSed - if you can't find it there
after a few days, let me know and I'll run the tests again and make sure
to let you know what happens.

-- 
David Cantrell | Official London Perl Mongers Bad Influence

Eye have a spelling chequer / It came with my pea sea
It planely marques four my revue / Miss Steaks eye kin knot sea.
Eye strike a quay and type a word / And weight for it to say
Weather eye am wrong oar write / It shows me strait a weigh.

Reply via email to