Skip Menu |

This queue is for tickets about the Term-ShellUI CPAN distribution.

Report information
The Basics
Id: 26692
Status: resolved
Priority: 0/
Queue: Term-ShellUI

People
Owner: Nobody in particular
Requestors: sherk [...] juniper.net
Cc:
AdminCc:

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



Subject: Error when pressing <TAB> twice in example script on Mac OS X 10.4.9
Date: Thu, 26 Apr 2007 16:57:18 +1200
To: bug-Term-ShellUI [...] rt.cpan.org
From: Erik Sherk <sherk [...] juniper.net>
Hi, I used cpan to download Term::ShellUI and fired up the fileman-example from the examples directory. When I press <TAB> twice after 'debug_complete, it bombs with /Users/sherk/.cpan/build/Term-ShellUI-0.85/examples FM> debug_complete 0=off 1=some, 2=more, 3=tons Cannot do `rl_on_new_line' in Term::ReadLine::Perl at /Library/Perl/ 5.8.6/Term/ReadLine/Perl.pm line 120. Two TABs in all the other places I've tried work. Distribution name and version: Term-ShellUI-0.85 Perl version 5.8.6 Operating System vendor and version: Mac OS X 10.4.9 Erik sherk at juniper.net
I was calling an non-standard function without first ensuring it was implemented. I'll upload a fixed release soon. It's too bad that I can't support suggestions on Term::ReadLine::Perl. I hope they choose to add this capability. I've files a request: http://rt.cpan.org//Ticket/Display.html?id=26727 Here's the patch that fixes this error: --- ShellUI.pm (revision 443) +++ ShellUI.pm (working copy) @@ -1232,9 +1232,11 @@ my $self = shift; my $msg = shift; - my $OUT = $self->{OUT}; - print $OUT $msg; - $self->{term}->rl_on_new_line(); + if($self->{term}->can('rl_on_new_line')) { + my $OUT = $self->{OUT}; + print $OUT $msg; + $self->{term}->rl_on_new_line(); + } } @@ -1616,8 +1618,10 @@ $str .= " ", print ", <" if $i != $#$tokens; $i += 1; } - print "\n$str\n"; - $self->{term}->rl_on_new_line(); + if($self->{term}->can('rl_on_new_line')) { + print "\n$str\n"; + $self->{term}->rl_on_new_line(); + } } my $str = $text; Marking resolved, please re-open if the new release doesn't work for you.
Subject: Re: [rt.cpan.org #26692] Error when pressing <TAB> twice in example script on Mac OS X 10.4.9
Date: Mon, 30 Apr 2007 15:06:33 +1200
To: <bug-Term-ShellUI [...] rt.cpan.org>
From: Erik Sherk <sherk [...] juniper.net>
Hi, Thanks! I no longer get the error, but I am expecting the string "0=off 1=some, 2=more, 3=tons" to be printed if I type <TAB> twice. Is this another bug? Also, do you have some more example scripts? Erik On Apr 27, 2007, at 8:15 AM, Scott Bronson via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26692 > > > I was calling an non-standard function without first ensuring it was > implemented. I'll upload a fixed release soon. > > It's too bad that I can't support suggestions on Term::ReadLine::Perl. > I hope they choose to add this capability. I've files a request: > http://rt.cpan.org//Ticket/Display.html?id=26727 > > Here's the patch that fixes this error: > > > --- ShellUI.pm (revision 443) > +++ ShellUI.pm (working copy) > @@ -1232,9 +1232,11 @@ > my $self = shift; > my $msg = shift; > > - my $OUT = $self->{OUT}; > - print $OUT $msg; > - $self->{term}->rl_on_new_line(); > + if($self->{term}->can('rl_on_new_line')) { > + my $OUT = $self->{OUT}; > + print $OUT $msg; > + $self->{term}->rl_on_new_line(); > + } > } > > > @@ -1616,8 +1618,10 @@ > $str .= " ", print ", <" if $i != $#$tokens; > $i += 1; > } > - print "\n$str\n"; > - $self->{term}->rl_on_new_line(); > + if($self->{term}->can('rl_on_new_line')) { > + print "\n$str\n"; > + $self->{term}->rl_on_new_line(); > + } > } > > my $str = $text; > > > Marking resolved, please re-open if the new release doesn't work > for you.
Subject: Re: [rt.cpan.org #26692] Error when pressing <TAB> twice in example script on Mac OS X 10.4.9
Date: Tue, 29 May 2007 13:03:57 -0700
To: bug-Term-ShellUI [...] rt.cpan.org
From: "Scott Bronson" <bronson [...] rinspin.com>
On 4/29/07, Erik Sherk via RT <bug-Term-ShellUI@rt.cpan.org> wrote: Show quoted text
> > > Queue: Term-ShellUI > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26692 > > I am expecting > the string "0=off 1=some, 2=more, 3=tons" to be printed > if I type <TAB> twice. Is this another bug?
it's a bug with the fix I wrote for the crash you originally reported. Apparently Term::Readline::Gnu doesn't support the can() method so suggestions are totally broken in 0.86. For now, use T-R-Gnu with the 0.85release. I'm talking with Ilya Zakharevich about how to proprely support suggestions in T-R-Perl. Also, do you Show quoted text
> have some more example scripts?
I don't. In fact, I don't even use ShellUI anymore, though I hope to need it again one day. I agree, the scripts that I provided are rather dated. If you or anyone else sends me scripts, I'm happy to add them to the examples directory. Sorry for the delay, I misplaced a bunch of mail when switching Rinspin to Google Apps.
This should be worked around in 0.9 and later. Definitely tell me if you see any crash or undocumented behavior!