Re: How to reset ENV

Patrick Böker <[email protected]> Wed, 06 Apr 2022 17:04:25 +0000
Newsgroups gmane.comp.lang.perl.par
Message-ID <3424187.iIbC2pHGDl@taurus>
--nextPart8917421.CDJkKcVGEf
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: Patrick =?ISO-8859-1?Q?B=F6ker?= <[email protected]>
To: Roderich Schupp <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: How to reset ENV
Date: Wed, 06 Apr 2022 19:04:25 +0200
Message-ID: <3424187.iIbC2pHGDl@taurus>
In-Reply-To: <CAC9r9zbtTU7b0CwnTdbLhAToeYy9FOJXTkNw63-QRMD4u2BngQ@mail.gmail.com>
References: <[email protected]> <[email protected]> <CAC9r9zbtTU7b0CwnTdbLhAToeYy9FOJXTkNw63-QRMD4u2BngQ@mail.gmail.com>

> It's the right idea. Also no heuristic needed:
> 
> my $ldlibpthname = $Config::Config{ldlibpthname};
> my $path_sep = $Config::Config{path_sep};
> $ENV{$ldlibpthname}  =~ s/^ \Q$ENV{PAR_TEMP}\E $path_sep? //x;
> 
> should restore the original LD_LIBRARY_PATH etc.

I almost forgot to reply back. This worked fine and is part of Rakubrew since 
version 28: https://github.com/Raku/App-Rakubrew/commit/
39ca617b01e91cd197ba3b9c3d298d3154ff03a1

Thank you for your support and help in solving this!

Patrick
--nextPart8917421.CDJkKcVGEf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTdpb2j9c3OmfntVsEsxulzgY84awUCYk3IGQAKCRAsxulzgY84
a9GlAPoDcebGiI8Q4DnqQ8oS3EBc+fTaTKFgmxsBfNzXFYKC2QD/cVT0MW3K0ptp
vqr6sRKhZxorNvuphZyb9d0rgI9+yQ4=
=rIpZ
-----END PGP SIGNATURE-----

--nextPart8917421.CDJkKcVGEf--