RE: JPL - post 5.8.1
[email protected] ("DeRykus, Charles E") Thu, 11 Nov 2004 08:58:42 -0800
| Newsgroups | perl.jpl,perl.perl5.porters |
|---|---|
| Message-ID | <5DF8FDE8DFE8744388602480FDCC0E310346FEC6@xch-nw-23.nw.nos.boeing.com> |
Another thanks to Patrick for the suggestion. I think though that an updated core patch is really the way to go (at least I get confused trying to wrap my mind around an alternative since JPL embeds Perl in Java) I'll take silence as a "patch update welcome" :) Rgds, -- Charles DeRykus -----Original Message----- From: Patrick LeBoutillier [mailto:[email protected]]=20 Sent: Wednesday, November 10, 2004 7:13 AM To: [email protected] Cc: [email protected]; [email protected]; [email protected] Subject: Re: JPL - post 5.8.1 Hi all, I don't know much about JPL, but I was faced with this problem a while = back with my Inline::Java project. I managed to overcome the problem by = copying the environment myself before calling perl_parse: char *args[] =3D {"inline-java", "-e1"} ; int envl =3D 0 ; int i =3D 0 ; char **envdup =3D NULL ; /* This will leak, but it's a one shot... */ for (i =3D 0 ; environ[i] !=3D NULL ; i++){ envl++ ; } envdup =3D (char **)calloc(envl + 1, sizeof(char *)) ; for (i =3D 0 ; i < envl ; i++){ envdup[i] =3D strdup(environ[i]) ; } interp =3D perl_alloc() ; perl_construct(interp) ; perl_parse(interp, xs_init, 2, args, envdup) ; perl_run(interp) ; It seemed to work for me without having to patch or recompile perl (but maybe my perl was already patched? I use just a = standard RedHat 9.0 perl). Maybe this soultion be applied to JPL? Patrick ----- Original Message ----- > > Is there any chance of Jarkko's core patch for JPL (Larry's Java Perl=20 > Lingo) making it back into core..? > > History: Java (jdk 1.2+) stopped tolerating Perl's environment =20 > diddling so Jarkko wrote a patch to just dup the environment so Perl=20 > can diddle its private copy. Java was happy because the original env=20 > was remained pristine, JPL kept working, and all was right with the=20 > world. > > The original patch made into 5.6.1 but not in subsequent versions that = > I can detect since I don't see the JPL or NEED_DUP_ENVIRON_FOR_MODIFY=20 > defines. Jarkko updated the patch for 5.8.1 and it's working there.=20 > However, I wonder if its not making the cut after 5.6.1 was oversight=20 > or deliberate euthanasia... > > We're worried that Jarkko's 5.8.1 patch will eventually stop working=20 > altogether as Perl marches on. JPL's heavily used here in several=20 > large legacy Java applications so its loss would cause major pain. A=20 > couple of us would gladly act as custodians for the code and try to=20 > pitch in in whatever way we're able. > > Rgds, > -- > Charles DeRykus > >