cpan module install failed, no prereqs missing - perl

Just trying to install a CPAN module, don't seem to be missing any prereqs, and can't seem to find anything that points to what I need to do to fix this. Can someone make sense of what the issue might be? I'd rather not force install unless I'm absolutely sure its maybe just an issue with the tests. I've looked at previous questions and the issue is almost always a missing prereq module but doesn't seem to be the case here.
C:\Users\zacha>cpan XML::Liberal
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Fri, 04 Mar 2022 11:36:42 GMT
Running install for module 'XML::Liberal'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.1)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\M\MI\MIYAGAWA\XML-Liberal-0.30.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.82)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20210123)
Configuring M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for XML::Liberal
Writing MYMETA.yml and MYMETA.json
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz
cp lib/XML/Liberal/Remedy/InvalidEncoding.pm blib\lib\XML\Liberal\Remedy\InvalidEncoding.pm
cp lib/XML/Liberal/Error.pm blib\lib\XML\Liberal\Error.pm
cp lib/XML/Liberal/LibXML.pm blib\lib\XML\Liberal\LibXML.pm
cp lib/XML/Liberal/Remedy/NestedCDATA.pm blib\lib\XML\Liberal\Remedy\NestedCDATA.pm
cp lib/XML/Liberal/Remedy/LowAsciiChars.pm blib\lib\XML\Liberal\Remedy\LowAsciiChars.pm
cp lib/XML/Liberal/Remedy/ControlCode.pm blib\lib\XML\Liberal\Remedy\ControlCode.pm
cp lib/XML/Liberal/Remedy/NotUTF8.pm blib\lib\XML\Liberal\Remedy\NotUTF8.pm
cp lib/XML/Liberal/Remedy/UnclosedHTML.pm blib\lib\XML\Liberal\Remedy\UnclosedHTML.pm
cp lib/XML/Liberal.pm blib\lib\XML\Liberal.pm
cp lib/XML/Liberal/Remedy/StandaloneAttribute.pm blib\lib\XML\Liberal\Remedy\StandaloneAttribute.pm
cp lib/XML/Liberal/Remedy/EntityRef.pm blib\lib\XML\Liberal\Remedy\EntityRef.pm
cp lib/XML/Liberal/Remedy/HTMLEntity.pm blib\lib\XML\Liberal\Remedy\HTMLEntity.pm
cp lib/XML/Liberal/Remedy/TrailingElements.pm blib\lib\XML\Liberal\Remedy\TrailingElements.pm
cp lib/XML/Liberal/Remedy/DeprecatedDTD.pm blib\lib\XML\Liberal\Remedy\DeprecatedDTD.pm
cp lib/XML/Liberal/Remedy/TrailingDoctype.pm blib\lib\XML\Liberal\Remedy\TrailingDoctype.pm
cp lib/XML/Liberal/Remedy/Declaration.pm blib\lib\XML\Liberal\Remedy\Declaration.pm
cp lib/XML/Liberal/Remedy/UndeclaredNS.pm blib\lib\XML\Liberal\Remedy\UndeclaredNS.pm
cp lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm blib\lib\XML\Liberal\Remedy\XHTMLEmptyTag.pm
cp lib/XML/Liberal/Remedy/UnquotedAttribute.pm blib\lib\XML\Liberal\Remedy\UnquotedAttribute.pm
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test for MIYAGAWA/XML-Liberal-0.30.tar.gz
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t
t/00_compile.t ......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/00_compile.t ......... ok
t/01_bad.t ............. Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/01_bad.t ............. 1/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/01_bad.t line 28.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/01_bad.t line 27.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/01_bad.t line 29.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
Can't call method "toString" on an undefined value at t/01_bad.t line 33, <$fh> line 1.
# Looks like you failed 2 tests of 15.
# Looks like your test exited with 2 just after 15.
t/01_bad.t ............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/15 subtests
t/02_global.t .......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/02_global.t .......... 7/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 19.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 18.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 20.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 25.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 24.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 26.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 30.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 29.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 31.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Looks like you failed 6 tests of 144.
t/02_global.t .......... Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/144 subtests
t/03_global_destroy.t .. Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/03_global_destroy.t .. 1/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/03_global_destroy.t line 24.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/03_global_destroy.t line 23.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/03_global_destroy.t line 25.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
t/03_global_destroy.t .. 55/? # Looks like you failed 2 tests of 71.
t/03_global_destroy.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/71 subtests
t/04_sanity.t .......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
t/04_sanity.t .......... 1/? parser error : Specification mandates value for attribute nofoo at position 2:12 at t/04_sanity.t line 6.
# Looks like your test exited with 2 just after 12.
t/04_sanity.t .......... Dubious, test returned 2 (wstat 512, 0x200)
All 12 subtests passed
Test Summary Report
-------------------
t/01_bad.t (Wstat: 512 Tests: 15 Failed: 2)
Failed tests: 14-15
Non-zero exit status: 2
t/02_global.t (Wstat: 1536 Tests: 144 Failed: 6)
Failed tests: 19-24
Non-zero exit status: 6
t/03_global_destroy.t (Wstat: 512 Tests: 71 Failed: 2)
Failed tests: 10-11
Non-zero exit status: 2
t/04_sanity.t (Wstat: 512 Tests: 12 Failed: 0)
Non-zero exit status: 2
Files=5, Tests=243, 2 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU)
Result: FAIL
Failed 4/5 test programs. 10/243 subtests failed.
gmake: *** [Makefile:800: test_dynamic] Error 2
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIYAGAWA/XML-Liberal-0.30.tar.gz
Stopping: 'install' failed for 'XML::Liberal'.

There are two bugs in XML-Liberal-0.30.
Forcing the installation of the module is not recommended.
This will install the distribution:
wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz
tar xvzf XML-Liberal-0.30.tar.gz
cd XML-Liberal-0.30
perl -pe's/mandate/mandates?/' -i~ lib/XML/Liberal/Remedy/StandaloneAttribute.pm
perl -pe's/->extract_error\(\K\$\#/"\$\#"/' -i~ lib/XML/Liberal.pm
perl -I . Makefile.PL
make test
make install
The module's logic is basically the following:
For up to 15 times by default:
Try to parse the document using XML::LibXML while catching errors.
If no errors occurred,
Success (Return)
For each error message,
Apply a fix to the XML to attempt to resolve the error.
Failure.
The issue at hand is that libxml2 has changed some of its error message. It used to emit
parser error : Specification mandate value for attribute ...
But the grammar mistake was fixed.
parser error : Specification mandates value for attribute ...
The fix is simple. In lib/XML/Liberal/Remedy/StandaloneAttribute.pm, replace
my ($attr) = $error->message =~
/^parser error : Specification mandate value for attribute (\w+)/
or return 0;
with
my ($attr) = $error->message =~
/^parser error : Specification mandates? value for attribute (\w+)/
or return 0;
(I'm assuming that some versions of libxml2 returned Specification mandate value. A web search seems to confirm this.)
The second issue is in how it parses error messages. I'm not exactly sure what the broken code is trying to do, but it can be worked around by replacing
my $error = $self->extract_error($#, \$xml);
with
my $error = $self->extract_error("$#", \$xml);
in XML/Liberal.pm.

Related

Perl DBD :: JDBC module issue No suitable driver found for jdbc:hsqldb

I am using Strawberry Perl 5.28 version and end up getting issues while installing DBD::JDBC module .
Hence the make/gmake , make test,gmake test is consistently failing even if I download the DBC::JDBC module and run perl Makefile.PL . I already have JDK 8 and JRE installed.
Any help would be appreciated .
C:\Users>cpan DBD::JDBC DBI
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Thu, 20 May 2021 14:53:47 GMT
Running install for module 'DBD::JDBC'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.086)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\V\VI\VIZDOM\DBD-JDBC-0.71.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.32)
CPAN: YAML::XS loaded ok (v0.77)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: CPAN::Meta loaded ok (v2.150010)
Configuring V/VI/VIZDOM/DBD-JDBC-0.71.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Using DBI 1.643 (for perl 5.028002 on MSWin32-x64-multi-thread) installed in C:/strawberry/perl/site/lib/auto/DBI/
Generating a gmake-style Makefile
Writing Makefile for DBD::JDBC
Writing MYMETA.yml and MYMETA.json
VIZDOM/DBD-JDBC-0.71.tar.gz
C:\strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for V/VI/VIZDOM/DBD-JDBC-0.71.tar.gz
CPAN: Module::CoreList loaded ok (v5.20190420)
cp JDBC.pod blib\lib\DBD\JDBC.pod
cp lib/Bundle/DBD/JDBC.pm blib\lib\Bundle\DBD\JDBC.pm
cp JDBC.pm blib\lib\DBD\JDBC.pm
VIZDOM/DBD-JDBC-0.71.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test for VIZDOM/DBD-JDBC-0.71.tar.gz
set CLASSPATH=dbd_jdbc.jar;t/hsqldb/hsqldb-1.8.0.2.jar;t/hsqldb/log4j-1.2.13.jar;C:\Users\Downloads\DBD-JDBC-0.71.tar\DBD-JDBC-0.71\log4j.properties;C:\Users\Downloads\SimbaSparkJDBC4-2.6.16.1020\SparkJDBC4.jar;
"C:\strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/01_env.t ...... ok
t/02_connect.t .. 1/5 DBD::JDBC::dr connect warning: No suitable driver found for jdbc:hsqldb:file:t/hsqldb/testdb at C:/strawberry/perl/site/lib/DBI.pm line 679.
# Failed test 'connected'
# at t/02_connect.t line 40.
t/02_connect.t .. 3/5 # Connection error: No suitable driver found for jdbc:hsqldb:file:t/hsqldb/testdb
# Make sure your CLASSPATH includes your JDBC driver.
# Looks like you failed 1 test of 5.
t/02_connect.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests
(less 2 skipped subtests: 2 okay)
t/03_hsqldb.t ... 1/22 DBD::JDBC::dr connect warning: No suitable driver found for jdbc:hsqldb:file:t/hsqldb/testdb at C:/strawberry/perl/site/lib/DBI.pm line 679.
# Failed test 'connected'
# at t/03_hsqldb.t line 34.
t/03_hsqldb.t ... 2/22 # Connection error: No suitable driver found for jdbc:hsqldb:file:t/hsqldb/testdb
# Looks like your test exited with 1 just after 22.
t/03_hsqldb.t ... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/22 subtests
(less 20 skipped subtests: 1 okay)
t/basis.t ....... skipped: BASIS URL not defined
t/oracle.t ...... skipped: Oracle URL not defined
Test Summary Report
-------------------
t/02_connect.t (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t/03_hsqldb.t (Wstat: 256 Tests: 22 Failed: 1)
Failed test: 2
Non-zero exit status: 1
Files=5, Tests=32, 7 wallclock secs ( 0.05 usr + 0.02 sys = 0.06 CPU)
Result: FAIL
Failed 2/5 test programs. 2/32 subtests failed.
gmake: *** [Makefile:780: test_dynamic] Error 255
VIZDOM/DBD-JDBC-0.71.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports VIZDOM/DBD-JDBC-0.71.tar.gz
Stopping: 'install' failed for 'DBD::JDBC'.
DBI is up to date (1.643).
After lot of fight I have found easy way to resolve this problem to install DBD::JDBC is to download this module as tar file : DBD-JDBC-0.71.tar from CPAN and navigate to path where Strawberry Perl is installed like C:\Strawberry\perl\vendor\lib\DBD and move all files from extracted tar to here . then JDBC should start working .

Smoke tests fail for most CPANTesters, but work fine on Travis CI and locally under perlbrew-built Perl

This is very similar to my recent question except that this time, the smoke tests of CGI::Github::Webhook are fine on Travis CI as well as locally (both, with the OS installed Perl 5.22 and with a Perl 5.24 built and installed via Perlbrew, see below), but fail in all but one CPAN Testers report.
The most common error there looks like this:
PERL_DL_NONLAZY=1 "/bbbike/perl-5.24.0/bin/perl5.24.0" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
Attempt to reload List/Util.pm aborted.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Sub/Exporter/Progressive.pm line 9.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Sub/Exporter/Progressive.pm line 9.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Devel/GlobalDestruction.pm line 11.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Devel/GlobalDestruction.pm line 11.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo/_Utils.pm line 26.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo/_Utils.pm line 26.
Compilation failed in require at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo.pm line 12.
BEGIN failed--compilation aborted at /bbbike/perl-5.24.0/lib/site_perl/5.24.0/Moo.pm line 12.
Compilation failed in require at /tmpfs/.cpan-build-cpansand/2016060903/CGI-Github-Webhook-0.04-pS8kOL/blib/lib/CGI/Github/Webhook.pm line 11.
BEGIN failed--compilation aborted at /tmpfs/.cpan-build-cpansand/2016060903/CGI-Github-Webhook-0.04-pS8kOL/blib/lib/CGI/Github/Webhook.pm line 11.
Compilation failed in require at ./cgitest.pl line 10.
BEGIN failed--compilation aborted at ./cgitest.pl line 10.
script /cgi-bin/cgitest.pl generated no valid headers at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 468.
Use of uninitialized value $in_fname in unlink at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
Use of uninitialized value $in_fname in concatenation (.) or string at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
can't unlink : No such file or directory at /opt/perl-5.24.0/lib/site_perl/5.24.0/CGI/Test.pm line 469.
Locally with my perlbrew-built Perl 5.24 it looks like this:
[…]-Github-Webhook-0.04 → perlbrew use 5.24.0
[…]-Github-Webhook-0.04 → which perl
/home/abe/perl5/perlbrew/perls/perl-5.24.0/bin/perl
[…]-Github-Webhook-0.04 → perl -v
This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2016, Larry Wall
Perl may be copied […]
[…]-Github-Webhook-0.04 → perl Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for CGI::Github::Webhook
Writing MYMETA.yml and MYMETA.json
[…]-Github-Webhook-0.04 → prove -l
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
t/cgi-test-auth-fail.t ... ok
t/cgi-test.t ............. ok
t/methods-non-json.t ..... ok
t/methods.t .............. ok
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing
All tests successful.
Files=10, Tests=52, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.66 cusr 0.07 csys = 0.77 CPU)
Result: PASS
Even if I call it the very same way as done in the CPAN Testers report, it does not fail for me:
[…]-Github-Webhook-0.04 → PERL_DL_NONLAZY=1 /home/abe/perl5/perlbrew/perls/perl-5.24.0/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/auth-fail.t ............ ok
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. ok
t/cgi-test-auth-fail.t ... ok
t/cgi-test.t ............. ok
t/methods-non-json.t ..... ok
t/methods.t .............. ok
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing
All tests successful.
Files=10, Tests=52, 1 wallclock secs ( 0.02 usr 0.02 sys + 0.68 cusr 0.05 csys = 0.77 CPU)
Result: PASS
But I fail to see why I can't reproduce those errors despite nearly every CPAN Testers report fails for the 0.04 version.
You are probably getting a different mix of libraries with perlbrew than with a vanilla cpan install. From your error messages, it looks like a few dependencies are missing.
I tried installing through cpan on perl (5.20.1), the tests seem to fail due to a warning getting inserted into the cgi output by Path::Tiny
cpan CGI::Github::Webhook
... skipping dependencies ...
CGI::Test is up to date (1.111).
ABE/CGI-Github-Webhook-0.04.tar.gz
Has already been unwrapped into directory /home/felix/.cpan/build/CGI-Github-Webhook-0.04-10wq5g
ABE/CGI-Github-Webhook-0.04.tar.gz
Has already been prepared
Running make for A/AB/ABE/CGI-Github-Webhook-0.04.tar.gz
cp static-badges/errored.png blib/lib/auto/share/module/CGI-Github-Webhook/errored.png
cp static-badges/failed.svg blib/lib/auto/share/module/CGI-Github-Webhook/failed.svg
cp static-badges/failed.png blib/lib/auto/share/module/CGI-Github-Webhook/failed.png
cp static-badges/success.svg blib/lib/auto/share/module/CGI-Github-Webhook/success.svg
cp static-badges/errored.svg blib/lib/auto/share/module/CGI-Github-Webhook/errored.svg
cp static-badges/success.png blib/lib/auto/share/module/CGI-Github-Webhook/success.png
cp lib/CGI/Github/Webhook.pm blib/lib/CGI/Github/Webhook.pm
Manifying 1 pod document
ABE/CGI-Github-Webhook-0.04.tar.gz
/usr/bin/make -- OK
Running make test
Skip blib/lib/auto/share/module/CGI-Github-Webhook/success.png (unchanged)
Skip blib/lib/auto/share/module/CGI-Github-Webhook/errored.svg (unchanged)
Skip blib/lib/auto/share/module/CGI-Github-Webhook/failed.svg (unchanged)
Skip blib/lib/auto/share/module/CGI-Github-Webhook/errored.png (unchanged)
Skip blib/lib/auto/share/module/CGI-Github-Webhook/failed.png (unchanged)
Skip blib/lib/auto/share/module/CGI-Github-Webhook/success.svg (unchanged)
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/auth-fail.t ............ 1/3
# Failed test 'CGI output as expected'
# at t/auth-fail.t line 28.
# got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
# Content-Type: text/plain; charset=utf-8
#
# Authentication failed
# '
# expected: 'Content-Type: text/plain; charset=utf-8
#
# Authentication failed
# '
# Looks like you failed 1 test of 3.
t/auth-fail.t ............ Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests
t/author-critic.t ........ skipped: these tests are for testing by the author
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/author-pod-syntax.t .... skipped: these tests are for testing by the author
t/basic-functionality.t .. 1/12
# Failed test 'CGI output as expected'
# at t/basic-functionality.t line 33.
# got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
# Content-Type: text/plain; charset=utf-8
#
# Successfully triggered
# '
# expected: 'Content-Type: text/plain; charset=utf-8
#
# Successfully triggered
# '
# Failed test 'CGI output as expected'
# at t/basic-functionality.t line 65.
# got: 'Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
# Content-Type: text/plain; charset=utf-8
#
# Trigger failed
# '
# expected: 'Content-Type: text/plain; charset=utf-8
#
# Trigger failed
# '
# Looks like you failed 2 tests of 12.
t/basic-functionality.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/12 subtests
t/cgi-test-auth-fail.t ... ok
t/cgi-test.t ............. ok
t/methods-non-json.t ..... Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
t/methods-non-json.t ..... ok
t/methods.t .............. Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
t/methods.t .............. ok
t/release-kwalitee.t ..... skipped: these tests are for release candidate testing
Test Summary Report
-------------------
t/auth-fail.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t/basic-functionality.t (Wstat: 512 Tests: 12 Failed: 2)
Failed tests: 2, 8
Non-zero exit status: 2
Files=10, Tests=52, 3 wallclock secs ( 0.10 usr 0.02 sys + 2.41 cusr 0.25 csys = 2.78 CPU)
Result: FAIL
Failed 2/10 test programs. 3/52 subtests failed.
Makefile:878: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
ABE/CGI-Github-Webhook-0.04.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ABE/CGI-Github-Webhook-0.04.tar.gz
Here is a stacktrace for that warning:
cpan look CGI::Github::Webhook
/.cpan/build/CGI-Github-Webhook-0.04-wA0tww/t $ perl -d -I../lib cgi/basic.pl 'echo foo'
Loading DB routines from perl5db.pl version 1.44
Editor support available.
Enter h or 'h h' for help, or 'man perldebug' for more help.
Unrecognized option(s) passed to make_path(): err at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117.
at /usr/local/share/perl/5.20.1/File/Path.pm line 115.
File::Path::mkpath("/tmp/XtmjrOLDl8/auto/share/module") called at /usr/local/share/perl/5.20.1/Path/Tiny.pm line 1117
Path::Tiny::mkpath(Path::Tiny=ARRAY(0xa6e67cc)) called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 75
Test::File::ShareDir::TempDirObject::_module_tempdir(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c)) called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 112
Test::File::ShareDir::TempDirObject::_module_share_target_dir(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c), "CGI::Github::Webhook") called at /usr/local/share/perl/5.20.1/Test/File/ShareDir/TempDirObject.pm line 132
Test::File::ShareDir::TempDirObject::_install_module(Test::File::ShareDir::TempDirObject=HASH(0xa5b316c), "CGI::Github::Webhook") called at /usr/local/share/perl/5.20.1/Test/File/ShareDir.pm line 60
Test::File::ShareDir::import("Test::File::ShareDir", "-share", HASH(0xa416f90)) called at cgi/basic.pl line 9
main::BEGIN() called at cgi/basic.pl line 13
eval {...} called at cgi/basic.pl line 13
main::(cgi/basic.pl:16): my $cgi = CGI->new();

Unable to install perl module Crypt::DSA

I'm trying to install Perl module Crypt::DSA but it's not working. Unfortunately, there's nothing much i could find on Internet.
Here's the detail:
[root#jenkins_slave Crypt-DSA-1.17]# perl Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for Crypt::DSA
Writing MYMETA.yml and MYMETA.json
[root#vpc-jenkins_slave3 Crypt-DSA-1.17]# make
Skip blib/lib/Crypt/DSA/Signature.pm (unchanged)
Skip blib/lib/Crypt/DSA/Key/SSH2.pm (unchanged)
Skip blib/lib/Crypt/DSA.pm (unchanged)
Skip blib/lib/Crypt/DSA/Util.pm (unchanged)
Skip blib/lib/Crypt/DSA/KeyChain.pm (unchanged)
Skip blib/lib/Crypt/DSA/Key/PEM.pm (unchanged)
Skip blib/lib/Crypt/DSA/Key.pm (unchanged)
Manifying blib/man3/Crypt::DSA.3pm
Manifying blib/man3/Crypt::DSA::Key.3pm
Manifying blib/man3/Crypt::DSA::Key::PEM.3pm
Manifying blib/man3/Crypt::DSA::Key::SSH2.3pm
Manifying blib/man3/Crypt::DSA::KeyChain.3pm
Manifying blib/man3/Crypt::DSA::Signature.3pm
Manifying blib/man3/Crypt::DSA::Util.3pm
[root#jenkins_slave Crypt-DSA-1.17]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t .. 1/1 # Testing Crypt::DSA 1.17
t/00-compile.t .. ok
t/01-util.t ..... ok
t/02-sign.t ..... ok
t/03-keygen.t ... ok
t/04-pem.t ...... 1/26 Use of uninitialized value $_[3] in abs at /usr/share/perl5/vendor_perl/Convert/ASN1/_encode.pm line 83.
Use of uninitialized value $_[3] in int at /usr/share/perl5/vendor_perl/Convert/ASN1/_encode.pm line 92.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Convert/PEM.pm line 102.
# Failed test 'Load key using Crypt::DSA::key'
# at t/04-pem.t line 46.
Can't call method "p" on an undefined value at t/04-pem.t line 47.
# Looks like you planned 26 tests but ran 7.
# Looks like you failed 1 test of 7 run.
# Looks like your test exited with 255 just after 7.
t/04-pem.t ...... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 20/26 subtests
t/06-fips.t ..... 1/9 # This takes a couple of minutes on slower machines.
t/06-fips.t ..... ok
t/07-openid.t ... 1/11
# Failed test 'Parsed key'
# at t/07-openid.t line 39.
Can't call method "p" on an undefined value at t/07-openid.t line 40.
# Looks like you planned 11 tests but ran 2.
# Looks like you failed 1 test of 2 run.
# Looks like your test exited with 255 just after 2.
t/07-openid.t ... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 10/11 subtests
Test Summary Report
-------------------
t/04-pem.t (Wstat: 65280 Tests: 7 Failed: 1)
Failed test: 7
Non-zero exit status: 255
Parse errors: Bad plan. You planned 26 tests but ran 7.
t/07-openid.t (Wstat: 65280 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 255
Parse errors: Bad plan. You planned 11 tests but ran 2.
Files=7, Tests=54, 464 wallclock secs ( 0.05 usr 0.05 sys + 21.05 cusr 0.19 csys = 21.34 CPU)
Result: FAIL
Failed 2/7 test programs. 2/54 subtests failed.
make: *** [test_dynamic] Error 255
I'm working on a Linux box. Any help will really be appreciated.
Solved in the comments:
Installing the module shows two dependencies for the following tests.
t/04-pem.t depends on Crypt::DES_EDE3
t/07-openid.t depends on Convert::PEM
Make sure they are up to date

Issue installing System::Timeout qw(timeout);

I am trying to install the timeout_system module. I'm on windows. When I try
cpanm System::Timeout
it fails.
When I try
cpan System::Timeout
I get
C:\Windows\System32>cpan System:Timeout
CPAN: LWP::UserAgent loaded ok (v6.03)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML loaded ok (v0.77)
CPAN: CPAN::SQLite loaded ok (v0.202)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Database was generated on Mon, 16 Sep 2013 20:14:09 GMT
Updating database file ...
Done!Running install for module 'System::Timeout'
Running make for C/CH/CHENGANG/System-Timeout-0.07.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/C/CH/CHENGANG/System-Timeout-0.07.tar.gz
CPAN: Digest::SHA loaded ok (v5.63)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/C/CH/CHENGANG/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.042)
Checksum for C:\Dwimperl\cpan\sources\authors\id\C\CH\CHENGANG\System-Timeout- 0.07.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.80)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4401)
CPAN: CPAN::Meta loaded ok (v2.120351)
CPAN: Module::CoreList loaded ok (v2.57)
CPAN.pm: Building C/CH/CHENGANG/System-Timeout-0.07.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for System::Timeout
Writing MYMETA.yml and MYMETA.json
cp lib/System/Timeout.pm blib\lib\System\Timeout.pm
C:\Dwimperl\perl\bin\perl.exe -MExtUtils::Command -e cp -- bin/timeout blib\script\timeout
pl2bat.bat blib\script\timeout
CHENGANG/System-Timeout-0.07.tar.gz
C:\Dwimperl\c\bin\dmake.EXE -- OK
Running make test
C:\Dwimperl\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00System-Timeout.t .. 1/9 'sleep' is not recognized as an internal or external command,
operable program or batch file.
'sleep' is not recognized as an internal or external command,
operable program or batch file.
Can't find string terminator "'" anywhere before EOF at -e line 1.
# Failed test 'system timeout exit code'
# at t/00System-Timeout.t line 21.
Can't find string terminator "'" anywhere before EOF at -e line 1.
# Failed test 'timeout timeout exit code'
# at t/00System-Timeout.t line 27.
# Looks like you failed 2 tests of 9.
t/00System-Timeout.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/9 subtests
t/01bin-timeout.t ..... '..' is not recognized as an internal or external command,
operable program or batch file.
t/01bin-timeout.t ..... 1/4 '..' is not recognized as an internal or external command,
operable program or batch file.
# Failed test 'bin-timeout exit code'
# at t/01bin-timeout.t line 15.
# Looks like you failed 1 test of 4.
t/01bin-timeout.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/4 subtests
Test Summary Report
-------------------
t/00System-Timeout.t (Wstat: 512 Tests: 9 Failed: 2)
Failed tests: 7, 9
Non-zero exit status: 2
t/01bin-timeout.t (Wstat: 256 Tests: 4 Failed: 1)
Failed test: 4
Non-zero exit status: 1
Files=2, Tests=13, 1 wallclock secs ( 0.09 usr + 0.05 sys = 0.14 CPU)
Result: FAIL
Failed 2/2 test programs. 3/13 subtests failed.
dmake.EXE: Error code 129, while making 'test_dynamic'
CHENGANG/System-Timeout-0.07.tar.gz
C:\Dwimperl\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports CHENGANG/System-Timeout-0.07.tar.gz
Running make install
make test had returned bad status, won't install without force
C:\Windows\System32>ppm Par-Packer
If anyone has an idea, that would be helpful. I don't have too much experience installing modules in Perl, and it would be very nice to use timeout_system.
Thx
Update: I ended up going with the following:
my $pid = fork();
if (!$pid) {
exec($command);
}
else {
sleep 100;
system("TASKKILL /F /T /PID $$");
}
which works.
I don't think this will work on Windows without change given that forking on Windows does not work the same as on *NIX systems. Installing and testing the dependency module IPC::Cmd via CPAN and running the sample script in the CPAN docs produces the following result...
c:\Perl>perl TEST_IPC_Cmd.pl
Set up gcc environment - 3.4.5 (mingw-vista special r3)
fetched webpage successfully: Continuing in background, pid 5244.
Output will be written to `wget-log.2'.
this is what the command printed:
Continuing in background, pid 5796.
Output will be written to `wget-log.3'.
run_forked is not available: at TEST_IPC_Cmd.pl line 30.
IPC::Open3 available: 1.12IPC::Run available: Can capture buffer: 1
c:\Perl>
Because System::Timeout is just a very simple wrapper around the IPC::Cmd run method (that also sets the timeout property), the IPC::Cmd module would first need modification to run correctly on Windows before System::Timeout would ever work as expected.
In my case, manually installing System::Timeout after installing IPC::Cmd successfully launched a an executable (a Perl one liner) but failed to kill the process after 3 seconds.
#Perl_AAA.pl
use System::Timeout qw(timeout);
print localtime()."\n";
timeout('perl -e "sleep(9); print \"Done\n\";"'); # invoke CORE::system, will not timeout exit
print localtime()."\n";
timeout("3", 'perl -e "sleep(9); print \"Done\n\";"'); # timeout exit after 3 seconds
print localtime()."\n";
print "Normal exit\n";
exit;
Result...
c:\Perl>
c:\Perl>perl TEST_AAA.pl
Thu Oct 17 12:51:22 2013
Done
Thu Oct 17 12:51:31 2013
Running [perl -e "sleep(9); print \"Done\n\";"]...
Done
Thu Oct 17 12:51:40 2013
Normal exit
c:\Perl>

How to install Parallel::ForkManager in Perl?

I am tiring to run multiple jobs in parallel by using perl script which use Parallel:ForkManager.
#!/usr/bin/perl -w
use Parallel::ForkManager;
my #make_obj = qw(
mode1_testlist
mode1_testlist1
mode1_testlist2
);
my $fm = $pm = Parallel::ForkManager-> new(3);
foreach my $obj (#make_obj) {
$fm->start and next;
print("make regression MODE=1 MODELIST=$make_obj");
$fm->finish();
}
but it throws me below error.
Can't locate Parallel/ForkManager.pm in #INC (#INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at parallel_run.pl line 3.
BEGIN failed--compilation aborted at parallel_run.pl line 3.
I have downloaded Parallel-ForkManager-1.03.tar.gz but I don't know where to keep it I mean how to install it.
I tried perl Makefile.PL && make test && make install:
WARNING: META_MERGE is not a known parameter.
WARNING: BUILD_REQUIRES is not a known parameter.
WARNING: LICENSE is not a known parameter.
Checking if your kit is complete...
Looks good
'BUILD_REQUIRES' is not a known MakeMaker parameter name.
'LICENSE' is not a known MakeMaker parameter name.
'META_MERGE' is not a known MakeMaker parameter name.
Writing Makefile for Parallel::ForkManager
cp lib/Parallel/ForkManager.pm blib/lib/Parallel/ForkManager.pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"test_harness(0,'blib/lib', 'blib/arch')" t/*.t
t/00-load.............ok 1/3 (in cleanup) Undefined subroutine
&File::Path::remove_tree called at /h/altera_dump2/vjain419/regression_flow_bck
/regression_flow/MSS1/hw/verif/top_/00e/tools/Parallel-ForkManager-1.03/blib
/lib/Parallel /ForkManager.pm line 662.
t/00-load.............ok
t/01-utf8-all.........skipped
all skipped: Need utf8::all for this test crashing on Windows
t/02-callback.........Array found where operator expected at t/02-callback.t line
21,at end of line
(Do you need to predeclare explain?)
syntax error at t/02-callback.t line 21, near "explain #out"
xecution of t/02-callback.t aborted due to compilation errors.
# Looks like your test died before it could output anything.
t/02-callback.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
t/03-callback-data....Array found where operator expected at t/03-callback-data.t line 13, at end of line
(Do you need to predeclare explain?)
syntax error at t/03-callback-data.t line 13, near "explain #out"
Execution of t/03-callback-data.t aborted due to compilation errors.
# Looks like your test died before it could output anything.
t/03-callback-data....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
t/02-callback.t 255 65280 2 4 200.00% 1-2
t/03-callback-data.t 255 65280 1 2 200.00% 1
1 test skipped.
Failed 2/4 test scripts, 50.00% okay. 3/6 subtests failed, 50.00% okay.
make: *** [test_dynamic] Error 255
Just use
cpan Parallel::ForkManager
Alternatively, execute the following command after making sure you have its dependencies (POSIX, Storable, File::Spec, File::Temp, File::Path 2.00 and Test::More 0.81_01) installed:
tar xvzf Parallel-ForkManager-1.03.tar.gz
cd Parallel-ForkManager-1.03
perl Makefile.PL && make test && make install
Like some of the comments on the accepted answer suggest, there can be a dependency missing. The following worked for me:
% cpan Test::More
% cpan Parallel::ForkManager