Skip Menu |

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

Report information
The Basics
Id: 81344
Status: resolved
Priority: 0/
Queue: Term-ReadLine-Event

People
Owner: dmcbride [...] cpan.org
Requestors: chm [...] cpan.org
Cc:
AdminCc:

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



Subject: ex/select.pl fails to run
Running ex/select.pl under perl 5.14.2 on cygwin/win7 gives the
error message:

"Can't locate object method "fileno" via package "Term::ReadLine::Gnu::Var" at select.pl line 42."

The problem is the OO call of fileno on the input
handle.  If you change the shift->fileno to fileno(shift)
then it runs fine.

I know there are OO flavors of handle in perl, maybe
another module needs to be use'd to enable that for
this case.

--Chris

On Thu Nov 22 09:38:15 2012, CHM wrote: Show quoted text
> Running ex/select.pl under perl 5.14.2 on cygwin/win7 gives the > error message: > > "Can't locate object method "fileno" via package > "Term::ReadLine::Gnu::Var" at > select.pl line 42." > > The problem is the OO call of fileno on the input > handle. If you change the shift->fileno to fileno(shift) > then it runs fine.
Thanks for the report and the workaround/fix. Show quoted text
> I know there are OO flavors of handle in perl, maybe > another module needs to be use'd to enable that for > this case.
I don't think that applies here - the object type being returned isn't the same on Windows as it is on Linux, adding in IO::Handle or FileHandle don't help (the correct one must already be loaded for the original code to work on Linux). I've corrected the example in git and will hope to release it soonish. There is one other ticket open that I'd like to close on before releasing. Thanks!
Subject: Re: [rt.cpan.org #81344] ex/select.pl fails to run
Date: Thu, 22 Nov 2012 12:33:17 -0500
To: bug-Term-ReadLine-Event [...] rt.cpan.org
From: Chris Marshall <devel.chm.01 [...] gmail.com>
On Thu, Nov 22, 2012 at 12:15 PM, Darin McBride via RT <bug-Term-ReadLine-Event@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=81344 > > > On Thu Nov 22 09:38:15 2012, CHM wrote:
>> Running ex/select.pl under perl 5.14.2 on cygwin/win7 gives the >> error message: >> >> "Can't locate object method "fileno" via package >> "Term::ReadLine::Gnu::Var" at >> select.pl line 42." >> >> The problem is the OO call of fileno on the input >> handle. If you change the shift->fileno to fileno(shift) >> then it runs fine.
> > Thanks for the report and the workaround/fix. >
>> I know there are OO flavors of handle in perl, maybe >> another module needs to be use'd to enable that for >> this case.
> > I don't think that applies here - the object type being returned isn't the > same on Windows as it is on Linux, adding in IO::Handle or FileHandle > don't help (the correct one must already be loaded for the original code to > work on Linux). I've corrected the example in git and will hope to release > it soonish. There is one other ticket open that I'd like to close on before > releasing.
FWIW, cygwin is basically unix (the win7 reference is in case there is some windows specific "feature" that is relevant for the cygwin build. In my experience these are often due to users adding extra checks for win32 rather than trusting the existing perl config and compile info. I was very excited to see this module (and the fact that more generalized event loop handling had made its way into Term::ReadLine. I've had an implementation for the GLUT+readline support in the works for some time but could never figure out how to get it into the standard framework. I'm planning to re-implement using the event_loop feature and should have some example code to add if it is of interest. I'm planning to implement a with_Prima as well since that is a nice-perl GUI toolkit. Thanks for the prompt response and making this feature more easily accessible to all. --Chris
Subject: Re: [rt.cpan.org #81344] ex/select.pl fails to run
Date: Thu, 22 Nov 2012 14:52:48 -0700
To: bug-Term-ReadLine-Event [...] rt.cpan.org
From: Darin McBride <dmcbride [...] cpan.org>
On Thursday November 22 2012 12:33:28 PM you wrote: Show quoted text
> FWIW, cygwin is basically unix (the win7 reference is > in case there is some windows specific "feature" that > is relevant for the cygwin build. In my experience these > are often due to users adding extra checks for win32 > rather than trusting the existing perl config and compile > info.
Yes I know what cygwin is, you forced me to upgrade my cygwin installation on my $work laptop just to try this out :-P I had to Data::Dumper on the filehandle to see the difference. Very weird, but probably related to libreadline on Windows vs real Unix. Show quoted text
> I was very excited to see this module (and the fact that > more generalized event loop handling had made its way > into Term::ReadLine. I've had an implementation for the > GLUT+readline support in the works for some time but > could never figure out how to get it into the standard > framework.
If you have more examples of usage that you want to share, I'll take any I can get - even if it's just a link to another distribution. Show quoted text
> I'm planning to re-implement using the event_loop > feature and should have some example code to add > if it is of interest. I'm planning to implement a > with_Prima as well since that is a nice-perl GUI
The primary role of this distribution is the ex directory (and notice its special LICENSE). So I'd prefer a standalone ex/Prima.pl first ;-) Show quoted text
> toolkit. Thanks for the prompt response and making > this feature more easily accessible to all.
And I don't entirely get the "integrate ReadLine in a graphical environment" thing :-) It might have been that the Tk support was to allow the Perl debugger to work with Tk apps, I'm not sure. In that case, I probably should look at ways to patch the debugger to allow this to work :-) Thanks for the feedback!
Download signature.asc
application/pgp-signature 198b

Message body not shown because it is not plain text.

Proposed fix delivered to git.
I did release this in December, so should close it....