Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Reporter CPAN distribution.

Report information
The Basics
Id: 76394
Status: resolved
Priority: 0/
Queue: CPAN-Reporter

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.2005
Fixed in: (no value)



Subject: PrereqCheck fails if JSON and JSON::XS are specified together
To reproduce the problem: $ PERL=perl $ (echo JSON; echo JSON::XS) | $PERL `$PERL -S perldoc -l CPAN::Reporter::PrereqCheck` JSON 1 2.53 JSON::XS 0 broken I think the root of the problem is that CPAN::Reporter::PrereqCheck is doing the require call on a filename, and not on a bareword. This works: $ $PERL -e 'require JSON; require JSON::XS;' (no output, no error) But this fails: $ $PERL -e 'require "/home/cpansand/var/ctps/5141RC1/install/perl-5.14.1-RC1/lib/site_perl/5.14.1/JSON.pm"; require "/home/cpansand/var/ctps/5141RC1/install/perl-5.14.1-RC1/lib/site_perl/5.14.1/i386-freebsd/JSON/XS.pm"' Modification of a read-only value attempted at /home/cpansand/var/ctps/5141RC1/install/perl-5.14.1-RC1/lib/site_perl/5.14.1/i386-freebsd/JSON/XS.pm line 1461. Compilation failed in require at -e line 1. (or to reproduce it without hardcoded paths, you can use: $PERL -le 'require JSON; require JSON::XS; print qq{require "$INC{"JSON.pm"}"; require "$INC{"JSON/XS.pm"}"}' | $PERL ) Maybe it would be better if CPAN::Reporter::PrereqCheck sets @INC instead and uses "require Module" instead of "require $file"? Regards, Slaven
Another problematic couple: Perl::Critic and POSIX. $ (echo Perl::Critic; echo POSIX) | $PERL `$PERL -S perldoc -l CPAN::Reporter::PrereqCheck` Perl::Critic 1 1.117 Subroutine import redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 24. Subroutine croak redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 32. Subroutine AUTOLOAD redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 38. Subroutine DESTROY redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 67. POSIX 0 broken $ $PERL -le 'require Perl::Critic; require POSIX; print qq{require "$INC{"Perl/Critic.pm"}"; require "$INC{"POSIX.pm"}"}' | $PERL Subroutine import redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 24, <DATA> line 1002. Subroutine croak redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 32, <DATA> line 1002. Subroutine AUTOLOAD redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 38, <DATA> line 1002. Subroutine DESTROY redefined at /home/e/eserte/var/ctps/5159/install/perl-v5.14.2/lib/5.14.2/i386-freebsd/POSIX.pm line 67, <DATA> line 1002. Your vendor has not defined POSIX macro SIGRTMIN, used at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/SigRt/_init.al) line 988 Compilation failed in require at - line 1, <DATA> line 1002. It seems that most changes to PrereqCheck.pm were done in the past because of problems with Module::Install (see RT #67417 and RT #51257). Maybe there's a better way to fix the problems: do a "require" or "use" using the module name, not the file path; and for an exception list (containing only Module::Install for now, maybe also Term::ReadLine::Perl, see the other ticket) just do the MM->parse_version check without the _try_load check. Regards, Slaven
I did a systematic search over saved test reports on my disk (using grep -r '!.*broken' /path/to/testreportsdir ) and found out that there are many problematic reports, i.e. where a prereq was marked as "broken", but very probably isn't. And one can find a lot of such examples at the cpantesters, here are some examples (with varying perl versions, OS systems etc.): http://www.cpantesters.org/cpan/report/76e11d7e-7d4c-11e1-8bc0-d336d4e05fc3 Memoize 1.01 1.02 ! Memoize::ExpireLRU 0.55 broken http://www.cpantesters.org/cpan/report/6979ea14-5cde-11e1-8aee-1dc49b9fc342 ! Class::MOP 0.80 broken http://www.cpantesters.org/cpan/report/7d930c7c-6a1e-11e1-b0cb-b0172a34c07f Moose 1.23 2.0402 Moose::Role 0 2.0402 ! Moose::Util::TypeConstraints 0 broken ! MooseX::Role::WithOverloading 0.09 broken http://www.cpantesters.org/cpan/report/39b45c9d-6c29-1014-829c-be1cae084a8a ! File::stat 0 broken These are all PASS reports. The FAIL reports were turned into a DISCARD, and so were neither stored on my hard disk nor sent to cpantesters, and are not available for analysis. Regards, Slaven
Seems like a problem when modules have a circular dependency, are reloaded, and have side effects on load. I'm working on some fixes and should have a new release shortly. David
PrereqCheck may even hang. On a linux system I saw the following: $ (echo Crypt::Random; echo Math::Pari) | $PERL `$PERL -S perldoc -l CPAN::Reporter::PrereqCheck` Crypt::Random 1 1.25 (hangs) Regards, Slaven
Subject: Re: [rt.cpan.org #76394] PrereqCheck fails if JSON and JSON::XS are specified together
Date: Wed, 11 Apr 2012 07:01:12 -0400
To: bug-CPAN-Reporter [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
Please try with the newest CPAN::Reporter. On Wed, Apr 11, 2012 at 3:07 AM, Slaven_Rezic via RT <bug-CPAN-Reporter@rt.cpan.org> wrote: Show quoted text
>       Queue: CPAN-Reporter >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=76394 > > > PrereqCheck may even hang. On a linux system I saw the following: > > $ (echo Crypt::Random; echo Math::Pari)  | $PERL `$PERL -S perldoc -l > CPAN::Reporter::PrereqCheck` > Crypt::Random 1 1.25 > (hangs) > > Regards, >    Slaven >