Discussion:
test failed missing POD::Parser despite a dependency of required
(too old to reply)
Jonas Smedegaard
2021-08-17 11:59:59 UTC
Permalink
Hi,

I am trying to understand the real cause of the test failure here:
http://www.cpantesters.org/cpan/report/9420f4a4-feca-11eb-bc66-57723b537541

Error message talks about missing POD::Parser, and yes that module is
needed, but should be pulled in since it is a runtime-requirement of
POD::Constants which the cpantest states is installed.

What am I missing?


- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/

[x] quote me freely [ ] ask before reusing [ ] keep private
Slaven Rezic
2021-08-29 16:34:42 UTC
Permalink
Post by Jonas Smedegaard
Hi,
http://www.cpantesters.org/cpan/report/9420f4a4-feca-11eb-bc66-57723b537541
Error message talks about missing POD::Parser, and yes that module is
needed, but should be pulled in since it is a runtime-requirement of
POD::Constants which the cpantest states is installed.
What am I missing?
Hi Jonas,

could be something similar like
https://rt.cpan.org/Ticket/Display.html?id=132139

Regards, Slaven
David Cantrell
2021-08-29 18:43:52 UTC
Permalink
Post by Slaven Rezic
Post by Jonas Smedegaard
Hi,
http://www.cpantesters.org/cpan/report/9420f4a4-feca-11eb-bc66-57723b537541
Error message talks about missing POD::Parser, and yes that module is
needed, but should be pulled in since it is a runtime-requirement of
POD::Constants which the cpantest states is installed.
What am I missing?
Hi Jonas,
could be something similar like
https://rt.cpan.org/Ticket/Display.html?id=132139
Indeed. bin/licensecheck has `#!/usr/bin/env perl` so it's using
whichever perl is first in the path, not whichever perl your code is
being tested with.

Best practice is to instead have `#!perl` as a placeholder shebang line.
Then when you `make` (using EU::MM) the path to the correct perl will be
filled in for you, in a copy of the script at blib/script/licensecheck,
which is what will in turn be installed. Run the version in blib/script
in your tests and you should be good.

Alternatively you could explicitly invoke your script using the correct
perl with something like:

use Config;
system($Config{perlpath}, 'bin/licensecheck', ...);
--
David Cantrell
Jonas Smedegaard
2021-08-30 08:49:16 UTC
Permalink
Quoting David Cantrell (2021-08-29 20:43:52)
Post by David Cantrell
Post by Slaven Rezic
Post by Jonas Smedegaard
http://www.cpantesters.org/cpan/report/9420f4a4-feca-11eb-bc66-57723b537541
Error message talks about missing POD::Parser, and yes that module
is needed, but should be pulled in since it is a
runtime-requirement of POD::Constants which the cpantest states is
installed.
What am I missing?
could be something similar like
https://rt.cpan.org/Ticket/Display.html?id=132139
Thanks, Slaven - and sorry for totally missing your previous bugreport
addressing this very issue :-/
Post by David Cantrell
Indeed. bin/licensecheck has `#!/usr/bin/env perl` so it's using
whichever perl is first in the path, not whichever perl your code is
being tested with.
Best practice is to instead have `#!perl` as a placeholder shebang line.
Then when you `make` (using EU::MM) the path to the correct perl will be
filled in for you, in a copy of the script at blib/script/licensecheck,
which is what will in turn be installed. Run the version in blib/script
in your tests and you should be good.
Thanks, David - I was unaware that path-less shebang was treated
specially. Using that looks like the most elegant approach.


- Jonas
--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/

[x] quote me freely [ ] ask before reusing [ ] keep private
Loading...