[32290] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3557 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 3 14:09:20 2011

Date: Sat, 3 Dec 2011 11:09:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 3 Dec 2011     Volume: 11 Number: 3557

Today's topics:
    Re: PERL_SYS_INIT() <rurban@cpanel.net>
    Re: Problem configuring OS/2 for installing CPAN packag <ben@morrow.me.uk>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 02 Dec 2011 11:54:34 -0600
From: Reini Urban <rurban@cpanel.net>
Subject: Re: PERL_SYS_INIT()
Message-Id: <jbb3cm$bfs$1@speranza.aioe.org>

On 11/01/2011 07:24 AM, Ben Morrow wrote:
> Quoth Ilya Zakharevich:
>> On 2011-10-31, Hallvard B Furuseth<h.b.furuseth@usit.uio.no>  wrote:
>>>> AFAICT they are only different on OS/2, but _INIT3 was introduced in
>>>> 5.6, so you should probably use it anyway. (They probably *ought* to be
>>>> different at least on Win32, as well, since the Win32 init code affects
>>>> the environment, but currently they aren't.)
>>>
>>> Sounds like it's safest to use INIT when available and INIT3 otherwise,
>>> then.  That leaves as much as possible of the work to Perl.
>>
>> The opposite.  INIT is not supported.  If it works, then only
>> accidentally.
>
> That was what I was intending to imply, but obviously I was unclear :(.
>
>> env MUST be passed as the third argument to INIT3 (although it might
>> be coded to do something reasonable when the third argument is NULL -
>> do not have the source with me now to check.
>
> The only case where INIT3 doesn't simply call INIT is OS/2, which
> properly uses the global environ when passed a NULL env pointer
> (complete with 'yuck' comments, I presume from you :)).
>
> The Win32 case *ought* to use INIT3, but instead pokes values into the
> environment using both CRTL's putenv and Win32's SetEnvironmentVariable,
> so for portable code relying on the semantics of INIT3 (that is, trying
> to pass anything other than the true global environ pointer) is
> currently a bad idea.
>
> So: Hallvard is currently right that INIT is more reliable, in practice.
> In principle, it would be better if this were not the case, but I
> suspect given the state of the Win32 code it isn't likely to change. The
> IMP_SYS stuff just relies too much on using Win32 calls to affect the
> real process environment.

Your code needs to support $ENV{bla} = "bla", so you must use INIT3.

-- 
Reini


------------------------------

Date: Fri, 02 Dec 2011 18:39:05 -0600
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Problem configuring OS/2 for installing CPAN packages
Message-Id: <CPKdnQOEztE08kTTnZ2dnUVZ8ladnZ2d@bt.com>


Quoth Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid>:
> 
> Done. Now I just need to find out what environment variable make needs
> in order to call gcc for NET::DNS :-(

Net::DNS, AFAICT, uses $Config{cc} and $Config{full_ar}, so these need
to be set correctly. That perl appears to have them set to 'gcc' and
'ar' respectively, so you need the right versions of those utilities in
your PATH. (Or you can edit Config_heavy.pl again, of course, and put in
a full path to the correct utility.)

(Good *God* that Makefile.PL's a nasty mess...)

Ben



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3557
***************************************


home help back first fref pref prev next nref lref last post