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: 75559
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: CPAN::Reporter::PrereqCheck broken for Tk + perl 5.15.8
Download (untitled) / with headers
text/plain 2.2k
CPAN::Reporter::PrereqCheck cannot get the version of Tk anymore: $ echo Tk | perl5.14.1 `perl5.14.1 -S perldoc -l CPAN::Reporter::PrereqCheck` Tk 1 804.030 $ echo Tk | perl5.15.8 `perl5.15.8 -S perldoc -l CPAN::Reporter::PrereqCheck` Tk 0 broken This is visible in test reports for distributions using Tk, e.g. for Tk-FlatCheckbox: OK (5.14.2): http://www.cpantesters.org/cpan/report/94515f24-65e4-11e1-a078-c92ea1f8bb33 broken (5.15.8): http://www.cpantesters.org/cpan/report/0544d978-65e4-11e1-8d46-1226a1f8bb33 I think that PrereqCheck is doing a require on a file to accomplish the check. This used to work: $ perl5.14.1 -e 'require "/home/cpansand/var/ctps/5141RC1/install/perl-5.14.1-RC1/lib/site_perl/5.14.1/i386-freebsd/Tk.pm"' (no output, no error) But with 5.15.8 it does not work anymore: $ perl5.15.8 -e 'require "/usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk.pm"' Can't locate object method "Construct" via package "Tk::Widget" at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk/Frame.pm line 13. Compilation failed in require at (eval 17) line 2. ...propagated at /usr/perl5.15.8/lib/5.15.8/base.pm line 84. BEGIN failed--compilation aborted at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk/Toplevel.pm line 10. Compilation failed in require at (eval 15) line 2. ...propagated at /usr/perl5.15.8/lib/5.15.8/base.pm line 84. BEGIN failed--compilation aborted at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk/MainWindow.pm line 5. Compilation failed in require at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk.pm line 192. Compilation failed in require at (eval 11) line 2. ...propagated at /usr/perl5.15.8/lib/5.15.8/base.pm line 84. BEGIN failed--compilation aborted at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk/Widget.pm line 12. Compilation failed in require at /usr/perl5.15.8/lib/site_perl/5.15.8/i386-freebsd/Tk.pm line 190. Compilation failed in require at -e line 1. However, require on a bareword still works: $ perl5.15.8 -e 'require Tk' This may be either a bug in perl 5.15.x, or maybe even an intended behavior change which needs to addressed in CPAN::Reporter, or something completely different. Regards, Slaven
Subject: Re: [rt.cpan.org #75559] CPAN::Reporter::PrereqCheck broken for Tk + perl 5.15.8
Date: Tue, 6 Mar 2012 16:51:36 -0500
To: bug-CPAN-Reporter [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
Download (untitled) / with headers
text/plain 293b
Show quoted text
> This may be either a bug in perl 5.15.x, or maybe even an intended > behavior change which needs to addressed in CPAN::Reporter, or something > completely different.
If you can determine what changed in 5.15.X, and if it's not a bug, I'll see if I can figure out a way around it. -- David
Download (untitled) / with headers
text/plain 1.1k
The same behavior with bleadperl based on 5.15.9: $ echo Tk | $PERL `$PERL -S perldoc -l CPAN::Reporter::PrereqCheck` Tk 0 broken ($PERL points to the perl binary here) But I found another problematic module, and this one is also broken for older perls: $ echo Term::ReadLine::Perl | perl5.14.1 `perl5.14.1 -S perldoc -l CPAN::Reporter::PrereqCheck` Term::ReadLine::Perl 0 broken Term::ReadLine::Perl cannot be required directly: $ perl5.14.1 -MTerm::ReadLine::Perl\ 9999 Can't locate object method "Features" via package "Term::ReadLine::Stub" at /home/cpansand/var/ctps/5141RC1/install/perl-5.14.1-RC1/lib/site_perl/5.14.1/Term/ReadLine/Perl.pm line 101. Compilation failed in require. BEGIN failed--compilation aborted. But: EUMM is able to detect the correct version. Just create a Makefile.PL with PREREQ_PM => { "Term::ReadLine::Perl" => 9999 }, and Makefile.PL will report: Warning: prerequisite Term::ReadLine::Perl 9999 not found. We have 1.0303. So maybe CPAN::Reporter::PrereqCheck should just steal the EUMM way of determining a module version? Regards, Slaven
Download (untitled) / with headers
text/plain 148b
Ah, I see now that PrereqCheck.pm is actually using MM->parse_version. But it's the additional try_load call which is failing. Regards, Slaven
Download (untitled) / with headers
text/plain 317b
I have a one-liner that gets the same error message on Windows XP with Perl 5.20.2: <p> Can't locate object method "Construct" via package "Tk::Widget" (perhaps you forgot to load "Tk::Widget"?) at C:/Perl/perl/site/lib/Tk/DropSite.pm line 10.</p> <p> perl -MTk::DropSite -e "print \"$Tk::DropSite::VERSION\n\"" </p>
Download (untitled) / with headers
text/plain 1.3k
On 2015-05-21 14:58:21, MNOONING wrote: Show quoted text
> I have a one-liner that gets the same error message on Windows XP with > Perl 5.20.2: > <p> Can't locate object method "Construct" via package "Tk::Widget" > (perhaps you forgot to load "Tk::Widget"?) at > C:/Perl/perl/site/lib/Tk/DropSite.pm line 10.</p> > <p> > perl -MTk::DropSite -e "print \"$Tk::DropSite::VERSION\n\"" > </p>
The original problem does not exist anymore, so I am resolving this ticket. But there's still a fundamental problem in the way how PrereqCheck works together with some module systems, where it's expected that a "principal" module is loaded first (like this is the case for Tk). The current approach to workaround these problems is to add another entry to %load_before in PrereqCheck.pm. Currently there are three entries for Tk modules: 'Tk::Font' => 'Tk', 'Tk::Widget' => 'Tk', 'Tk::Label' => 'Tk', but probably more have to be added, like Tk::DropSite. Another approach could be that module authors shouldn't declare single Tk::* modules in their PREREQ_PM, just the principal Tk module. And finally it would be nice if the inheritence tree in Tk would be fixed. The root of the problem is a recursive dependency Tk::Widget -> Tk -> Tk::MainWindow -> Tk::Frame -> Tk::Widget. I am open to ideas how this could be done while retaining backward compatibility.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.