Skip Menu | You are currently an anonymous guest. | Login | Return to Main | About rt.cpan.org
 

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

X Report information
Id: 26692
Status: open
Left: 0 min
Priority: 0/0
Queue: Term-ShellUI

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

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



X History Display mode: Brief headersFull headers
#   Thu Apr 26 00:57:55 2007 sherk[...]juniper.net - Ticket created  
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>
[text/plain 585b]
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







#   Thu Apr 26 16:15:20 2007 BRONSON - Correspondence added  
[text/plain 1.1k]
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.
#   Thu Apr 26 16:15:24 2007 RT_System - Status changed from 'new' to 'open'  
#   Thu Apr 26 16:15:26 2007 BRONSON - Status changed from 'open' to 'resolved'  
#   Sun Apr 29 23:06:40 2007 sherk[...]juniper.net - Correspondence added  
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>
[text/plain 1.5k]
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:

>
> <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.

#   Sun Apr 29 23:07:03 2007 RT_System - Status changed from 'resolved' to 'open'  
#   Tue May 29 16:04:17 2007 bronson[...]rinspin.com - Correspondence added  
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>
[text/plain 980b]
On 4/29/07, Erik Sherk via RT <bug-Term-ShellUI[...]rt.cpan.org> wrote:
>
>
> 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
> 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.

[text/html 1.5k]