Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JPL - post 5.8.1

0 views
Skip to first unread message

c...@carios2.ca.boeing.com

unread,
Nov 9, 2004, 8:29:09 PM11/9/04
to perl5-...@perl.org, a...@corbomite.ca.boeing.com, j...@perl.org

Is there any chance of Jarkko's core patch for JPL (Larry's
Java Perl Lingo) making it back into core..?

History: Java (jdk 1.2+) stopped tolerating Perl's environment
diddling so Jarkko wrote a patch to just dup the environment so
Perl can diddle its private copy. Java was happy because the
original env was remained pristine, JPL kept working, and all
was right with the 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 defines. Jarkko updated the
patch for 5.8.1 and it's working there. However, I wonder
if its not making the cut after 5.6.1 was oversight or
deliberate euthanasia...

We're worried that Jarkko's 5.8.1 patch will eventually stop
working altogether as Perl marches on. JPL's heavily used
here in several large legacy Java applications so its loss
would cause major pain. A couple of us would gladly act as
custodians for the code and try to pitch in in whatever way
we're able.

Rgds,
--
Charles DeRykus

Patrick LeBoutillier

unread,
Nov 10, 2004, 10:13:00 AM11/10/04
to c...@carios2.ca.boeing.com, perl5-...@perl.org, a...@corbomite.ca.boeing.com, j...@perl.org
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[] = {"inline-java", "-e1"} ;
int envl = 0 ;
int i = 0 ;
char **envdup = NULL ;

/* This will leak, but it's a one shot... */
for (i = 0 ; environ[i] != NULL ; i++){
envl++ ;
}
envdup = (char **)calloc(envl + 1, sizeof(char *)) ;
for (i = 0 ; i < envl ; i++){
envdup[i] = strdup(environ[i]) ;
}

interp = 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

0 new messages