develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
September 24, 2014 20:47
Subject:
Re: [perl #122657] t/io/socket.t failing on hurd: peer from recv()should be empty or the remote name
Message ID:
CAHhgV8iXhJK+JB80AgyJcfA17NEPyUO+spxKzjxVd75Z57wRKA@mail.gmail.com
On Wed, Sep 24, 2014 at 10:48 AM, Svante Signell <svante.signell@gmail.com>
wrote:

> Did not find that when searching the web, and thought the return value
> was as the system call. Found it now:
> http://perldoc.perl.org/functions/recv.html
>
> Attached is a patch modified Debian patch which works in both GNU/Linux
> and GNU/Hurd. Of course you can find a better solution, and the print
> statements should be removed. Comparing $recv_peer eq my $peer_name does
> not work.
>

Your patch is nonsensical.


> BTW: What's the difference between $var and my $var?
>

And that question explains why. The my keyword created a new lexical
variable with that name (so you're redeclaring $recv_addr and $peer_addr).

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About