develooper Front page | perl.perl5.porters | Postings from October 1999

Re: Make IO::Socket::INET pick up LocalAddr from the ENVIRONMENT

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
October 26, 1999 09:47
Subject:
Re: Make IO::Socket::INET pick up LocalAddr from the ENVIRONMENT
Message ID:
199910261653.JAA15948@activestate.com
On 26 Oct 1999 09:08:21 -0000, Gisle Aas wrote:
>I have had several requests for a way to control the 'LocalAddr' used
>for connections made by LWP.  I think the best way to deal with this
>is to make is configurable at the IO::Socket::INET level.  In this
>patch I have chosen to make it default from an environment variable.
>Another approach could be to provide a class method or simply a global
>variable like $IO::Socket::INET::DEFAULT_LOCAL_ADDR.  Any other
>thoughts or suggestiong for a better environment variable name?

I don't much like using %ENV for holding defaults for modules.

A global in the IO:: namespace is better, but it seems to me the default
for LocalAddr should automatically be the most typical/reasonable one
("localhost"?), without people having to poke around globals.


Sarathy
gsar@ActiveState.com

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