This queue is for tickets about the Devel-REPL CPAN distribution.

Report information
The Basics
Id:
84246
Status:
open
Worked:
30 minutes
Users:
GORTAN: 30 minutes
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Normal
Broken in:
1.003016
Fixed in:
1.003018



When trying to install Devel::Repl version 1.3.16 on Gentoo amd64 Linux, cpanminus fails during test with: t/load_core.t ..... ok Unknown error Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/Term/ReadLine/Perl.pm line 63. # Tests were run but no plan was declared and done_testing() was not seen. t/load_plugins.t .. When I manually execute the testcase: $ perl -Iblib/lib t/load_plugins.t I get: ok 1 - use Devel::REPL; ok 2 - plugin B::Concise loaded Cannot create second readline interface, falling back to dumb. ok 3 - plugin Colors loaded Cannot create second readline interface, falling back to dumb. ... ok 30 - plugin Turtles loaded not ok 31 - no (unexpected) warnings (via done_testing) # Failed test 'no (unexpected) warnings (via done_testing)' # at t/load_plugins.t line 60. 1..31 # Looks like you failed 1 test of 31.
Subject: Re: [rt.cpan.org #84246]
Date: Wed, 27 Mar 2013 13:05:50 -0700
To: Philipp Gortan via RT <bug-Devel-REPL@rt.cpan.org>
From: Karen Etheridge <ether@cpan.org>
On Wed, Mar 27, 2013 at 02:55:10PM -0400, Philipp Gortan via RT wrote:
Show quoted text
> When I manually execute the testcase: > $ perl -Iblib/lib t/load_plugins.t > > I get: > > ok 1 - use Devel::REPL; > ok 2 - plugin B::Concise loaded > Cannot create second readline interface, falling back to dumb. > ok 3 - plugin Colors loaded > Cannot create second readline interface, falling back to dumb. > ... > ok 30 - plugin Turtles loaded > not ok 31 - no (unexpected) warnings (via done_testing) > # Failed test 'no (unexpected) warnings (via done_testing)' > # at t/load_plugins.t line 60. > 1..31 > # Looks like you failed 1 test of 31.
Could you try this again, including -MCarp::Always in the perl command? (Also, you snipped the warning that caused that failing test.) thanks!
On Wed Mar 27 16:06:18 2013, ETHER wrote:
Show quoted text
> Could you try this again, including -MCarp::Always in the perl command? > (Also, you snipped the warning that caused that failing test.)
Sorry, I didn't see anything of value in the snipped lines ;-) I re-ran the command including -MCarp::Always, complete output is attached.
Subject: load_plugins.out

Message body not shown because it is not plain text.

From: dark3phoenix@gmail.com
Looks like the problem is that you can't open multiple instances of Term::ReadLine:PERL from the same object. I was able to correct this by changing the test to reuse the same Devel::REPL instance each time. This prevents the warning that causes the test to fail. I don't think this changes the spirit of the test, it's just a byproduct of how Term::ReadLine::Perl works.
Subject: load_plugins.t
use strict; use warnings; use Test::More; use Test::Warnings; use_ok('Devel::REPL'); my @plugins = qw/ B::Concise Colors Commands Completion CompletionDriver::Globals CompletionDriver::INC CompletionDriver::Keywords CompletionDriver::LexEnv CompletionDriver::Methods CompletionDriver::Turtles DDC DDS DumpHistory FancyPrompt FindVariable History Interrupt LexEnv MultiLine::PPI Nopaste OutputCache PPI Packages Peek ReadLineHistory Refresh ShowClass Timing Turtles /; my $repl = Devel::REPL->new; for my $plugin_name (@plugins) { test_load_plugin($plugin_name, $repl); } sub test_load_plugin { my ($plugin_name, $repl) = @_; my $test_name = "plugin $plugin_name loaded"; eval "use Devel::REPL::Plugin::$plugin_name"; unless($@) { eval { $repl->load_plugin($plugin_name) }; ok(!$@, $test_name); } else { SKIP: { skip "could not eval plugin $plugin_name", 1; } } } done_testing;
RT-Send-CC: dark3phoenix@gmail.com
Thanks, Christopher, I've released this patch as 1.003017! *crosses fingers*
Thanks, Ether. If I now manually run the testcase, it works fine: $ cd ~/.cpanm/work/1365095439.20678/Devel-REPL-1.003017 $ perl -I blib/lib/ -I blib/arch/ t/load_plugins.t ... 1..31 so all is fine. However, if I use prove: $ prove -b t/load_core.t ..... ok t/load_plugins.t .. 1/? Unknown error Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.12.4/Term/ReadLine/Perl.pm line 63. # Tests were run but no plan was declared and done_testing() was not seen. t/load_plugins.t .. Dubious, test returned 2 (wstat 512, 0x200) All 1 subtests passed Test Summary Report ------------------- t/load_plugins.t (Wstat: 512 Tests: 1 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output Files=2, Tests=28, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.61 cusr 0.05 csys = 0.69 CPU) Result: FAIL Can you reproduce this phenomenon?
Subject: Re: [rt.cpan.org #84246] issues with Term::ReadLine::Perl
Date: Fri, 5 Apr 2013 11:04:20 -0700
To: Philipp Gortan via RT <bug-Devel-REPL@rt.cpan.org>
From: Karen Etheridge <ether@cpan.org>
On Thu, Apr 04, 2013 at 01:16:39PM -0400, Philipp Gortan via RT wrote:
Show quoted text
> Thanks, Ether. If I now manually run the testcase, it works fine: > However, if I use prove: > ... > Can you reproduce this phenomenon?
Negative -- I have never been able to reproduce this, on either OSX or ubuntu linux. What happens if you do this manually (this is the line that is dying, in Term::ReadLine::Perl): perl -wle'eval {require Term::ReadLine::readline}; die $@ if $@'
On Fri Apr 05 14:04:33 2013, ETHER wrote:
Show quoted text
> perl -wle'eval {require Term::ReadLine::readline}; die $@ if $@'
I think we have a clue: running the command as you specified: $ perl -wle'eval {require Term::ReadLine::readline}; die $@ if $@' works without an error. However, if I redirect stdout: $ perl -wle'eval {require Term::ReadLine::readline}; die $@ if $@' >/dev/null Unknown error Compilation failed in require at -e line 1.
From: mephinet@gmx.net
On Sun Apr 07 16:59:36 2013, gortan@gmail.com wrote:
Show quoted text
> However, if I redirect stdout: > $ perl -wle'eval {require Term::ReadLine::readline}; die $@ if $@'
> >/dev/null
> Unknown error > Compilation failed in require at -e line 1.
I think I found a work-around which makes the testsuite pass again: changing the definition of Devel::REPL's term attribute to lazy_build. has 'term' => (is => 'rw', lazy_build => 1); sub _build_term {Term::ReadLine->new('Perl REPL')}; Can you give this one a try please? PS: does it make sense to define an attribute as required _and_ specify a default?
Subject: Re: [rt.cpan.org #84246] issues with Term::ReadLine::Perl
Date: Sun, 19 May 2013 08:52:09 -0700
To: "mephinet@gmx.net via RT" <bug-Devel-REPL@rt.cpan.org>
From: Karen Etheridge <ether@cpan.org>
On Sun, May 19, 2013 at 09:21:21AM -0400, mephinet@gmx.net via RT wrote:
Show quoted text
> I think I found a work-around which makes the testsuite pass again: changing the definition of Devel::REPL's term attribute to lazy_build.
Hmmm interesting! why would delaying the building of the term object make a difference? But it's certainly worth a try. I've also poked the p5p folks to release the newest Term::ReadLine to cpan -- the version in 5.18.0 is two versions ahead of what's on PAUSE.
Show quoted text
> PS: does it make sense to define an attribute as required _and_ specify a default?
No, if both fields are defined, 'required' is ignored.
Subject: Re: [rt.cpan.org #84246] issues with Term::ReadLine::Perl
Date: Sun, 19 May 2013 11:54:41 -0400
To: bug-Devel-REPL@rt.cpan.org
From: Chris Marshall <devel.chm.01@gmail.com>
It may be because Term::ReadLine::Perl can't instantiate more than one instance.  -chm


On Sun, May 19, 2013 at 11:52 AM, Karen Etheridge via RT <bug-Devel-REPL@rt.cpan.org> wrote:
Show quoted text
       Queue: Devel-REPL
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=84246 >

On Sun, May 19, 2013 at 09:21:21AM -0400, mephinet@gmx.net via RT wrote:
> I think I found a work-around which makes the testsuite pass again: changing the definition of Devel::REPL's term attribute to lazy_build.

Hmmm interesting!  why would delaying the building of the term object make
a difference?  But it's certainly worth a try.

I've also poked the p5p folks to release the newest Term::ReadLine to cpan
-- the version in 5.18.0 is two versions ahead of what's on PAUSE.

> PS: does it make sense to define an attribute as required _and_ specify a default?

No, if both fields are defined, 'required' is ignored.


Subject: Re: [rt.cpan.org #84246] issues with Term::ReadLine::Perl
Date: Sun, 19 May 2013 09:04:56 -0700
To: "devel.chm.01@gmail.com via RT" <bug-Devel-REPL@rt.cpan.org>
From: Karen Etheridge <ether@cpan.org>
On Sun, May 19, 2013 at 11:54:54AM -0400, devel.chm.01@gmail.com via RT wrote:
Show quoted text
> Queue: Devel-REPL > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=84246 > > > It may be because Term::ReadLine::Perl can't instantiate more than one > instance. -chm
Ok, Devel-REPL-1.003018 has just been uploaded... let another round of failing cpantesters reports begin :D
On Sun May 19 12:05:13 2013, ETHER wrote:
Show quoted text
> Ok, Devel-REPL-1.003018 has just been uploaded... let another round of > failing cpantesters reports begin :D
Works for me, thanks! And the cpantester reports are looking good, too...
RT-Send-CC: devel.chm.01@gmail.com, mephinet@gmx.net, dark3phoenix@gmail.com
On 2013-05-23 03:44:43, gortan@gmail.com wrote:
Show quoted text
> On Sun May 19 12:05:13 2013, ETHER wrote: >
> > Ok, Devel-REPL-1.003018 has just been uploaded... let another round of > > failing cpantesters reports begin :D
> > Works for me, thanks! And the cpantester reports are looking good, too...
If anyone is still having issues, please see:
Show quoted text
> From: Rocky Bernstein <rocky@cpan.org> > > I've just released > Term:ReadLine::Perl5<https://metacpan.org/module/ROCKY/Term-ReadLine-Perl5-1.08/ > lib/Term/ReadLine/Perl5.pm> > and > things don't > fail<http://www.cpantesters.org/distro/T/Term-ReadLine-Perl5.html#Term-ReadLine- > Perl5-1.08>to > the point where I can start considering outstanding bugs. (Slaven's > failures don't count.) > > You mentioned that Term::ReadLine::Perl messes up Devel::REPL. (I'm a > casual user of Devel::REPL and even have a Devel::Trepan > plugin<https://metacpan.org/module/ROCKY/Devel-Trepan-Shell-1.4/lib/Devel/Trepan > /Shell.pm>for > it). > > If you could file an github > issue<https://github.com/rocky/p5-Term-ReadLine-Perl5/issues>with > enough detail to explain what's wrong, ideally paring things down if > possible, I'll look at it when I get a chance. (Please *do not *use the RT > tracker for this project and if I knew how to disable it I would.)
On Fri Jun 14 22:41:34 2013, ETHER wrote:
Show quoted text
> On 2013-05-23 03:44:43, gortan@gmail.com wrote:
> > On Sun May 19 12:05:13 2013, ETHER wrote: > >
> > > Ok, Devel-REPL-1.003018 has just been uploaded... let another
> round of
> > > failing cpantesters reports begin :D
> > > > Works for me, thanks! And the cpantester reports are looking good,
> too... > > > If anyone is still having issues, please see: >
> > From: Rocky Bernstein <rocky@cpan.org> > > > > I've just released > > Term:ReadLine::Perl5<https://metacpan.org/module/ROCKY/Term-
> ReadLine-Perl5-1.08/
> > lib/Term/ReadLine/Perl5.pm> > > and > > things don't > > fail<http://www.cpantesters.org/distro/T/Term-ReadLine-
> Perl5.html#Term-ReadLine-
> > Perl5-1.08>to > > the point where I can start considering outstanding bugs. (Slaven's > > failures don't count.) > > > > You mentioned that Term::ReadLine::Perl messes up Devel::REPL. (I'm
> a
> > casual user of Devel::REPL and even have a Devel::Trepan > > plugin<https://metacpan.org/module/ROCKY/Devel-Trepan-Shell-
> 1.4/lib/Devel/Trepan
> > /Shell.pm>for > > it). > > > > If you could file an github > > issue<https://github.com/rocky/p5-Term-ReadLine-Perl5/issues>with > > enough detail to explain what's wrong, ideally paring things down if > > possible, I'll look at it when I get a chance. (Please *do not *use
> the RT
> > tracker for this project and if I knew how to disable it I would.)
>
An important clarification. I do NOT work on Term::ReadLine::Perl but Term::ReadLine::Perl5. So if you are using this and have a problem, then by all means open an issue.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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