Skip Menu |

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 119260
Status: open
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: simon [...] neto.com.au
Cc:
AdminCc:

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



Subject: Can't locate object method "fileno" via package "FileHandle" at IO-Socket-IP line 916
Date: Fri, 16 Dec 2016 11:42:29 +0800
To: bug-IO-Socket-IP [...] rt.cpan.org
From: Simon Yuen <simon [...] neto.com.au>
Hi, I would like to report a bug on the following error. *Can't locate object method "fileno" via package "FileHandle" at vendor/perl/lib/perl5/IO/Socket/IP.pm line 916* 907:sub socket :method Show quoted text
> 908:{ > 909: my $self = shift; > 910: return $self->SUPER::socket(@_) if not defined $self->fileno; > 911: return $self->SUPER::socket(@_); # I added this line and works > 912: > 913: # I hate core prototypes sometimes... > 914: socket( my $tmph, $_[0], $_[1], $_[2] ) or return undef; > 915: > 916: dup2( $tmph->fileno, $self->fileno ) or die "Unable to dup2 $tmph > onto $self - $!"; > 917:}
It is called from LWP::UserAgent with parameter $_[0]=2, $_[1]=1, $_[2]=6 I guess the line dup2( $tmph->fileno, $self->fileno ) or die "Unable to dup2 $tmph onto Show quoted text
> $self - $!"
can be changed to dup2( fileno($tmph), $self->fileno ) or die "Unable to dup2 $tmph onto Show quoted text
> $self - $!";
to avoid the above issue Thank you. -- Regards, Simon <https://www.neto.com.au> Simon Yuen +61 7 3077 9696 <+61+7+3077+9696> | +852 9547 4422 <+852+9547+4422> simon@neto.com.au <maxine@neto.com.au> www.neto.com.au Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Neto E-commerce Solutions does not warrant that this email and any attachments are error or virus free and recommends that all attachments be checked for computer viruses.
On Thu Dec 15 22:42:43 2016, simon@neto.com.au wrote: Show quoted text
> *Can't locate object method "fileno" via package "FileHandle" at > vendor/perl/lib/perl5/IO/Socket/IP.pm line 916*
What perl version is that? On anything vaguely recent, FileHandle is really just a subclass of IO::File, itself a subclass of IO::Handle, which provides such as a method. -- Paul Evans
Subject: Re: [rt.cpan.org #119260] Can't locate object method "fileno" via package "FileHandle" at IO-Socket-IP line 916
Date: Tue, 7 Mar 2017 10:07:10 +0800
To: bug-IO-Socket-IP [...] rt.cpan.org
From: Simon Yuen <simon [...] neto.com.au>
Thanks for your reply. We use perl *v5.10.1 (*) built for x86_64-linux-thread-multi* with the followings: IO::Socket::IP = 0.37 IO::Socket = 1.38 IO::Handle = 1.35 The error is thrown by *IO::Socket::IP* package. It seems that we don't have the *FileHandle.pm* in our vendor folder. I guess that should be the cause of this issue. At the moment, we fixed the issue by forcing the system to use *IO::Socket::INET *with the following code. BEGIN { $Net::HTTP::SOCKET_CLASS = 'IO::Socket::INET'; } On Mon, Mar 6, 2017 at 11:45 PM, Paul Evans via RT < bug-IO-Socket-IP@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=119260 > > > On Thu Dec 15 22:42:43 2016, simon@neto.com.au wrote:
> > *Can't locate object method "fileno" via package "FileHandle" at > > vendor/perl/lib/perl5/IO/Socket/IP.pm line 916*
> > What perl version is that? On anything vaguely recent, FileHandle is > really just a subclass of IO::File, itself a subclass of IO::Handle, which > provides such as a method. > > -- > > Paul Evans >
-- Regards, Simon <https://www.neto.com.au> Simon Yuen | Lead Programmer +61 7 3077 9696 <+61+7+3077+9696> | +852 9547 4422 <+852+9547+4422> simon@neto.com.au <maxine@neto.com.au> www.neto.com.au <https://www.facebook.com/NetoEcommerce> <https://plus.google.com/u/0/+NetoAu/posts> <https://instagram.com/netoecommerce/> <http://www.linkedin.com/company/neto-e-commerce-solutions/> <https://www.pinterest.com/netoecommerce/> <https://twitter.com/netoecommerce/> Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorised and may be unlawful. If you are not an addressee, please inform the sender immediately. Neto E-commerce Solutions does not warrant that this email and any attachments are error or virus free and recommends that all attachments be checked for computer viruses.