Hello,
If a script is started by 'parl' I can't figure out how to get the
executable name, since $^X always returns the *constant* string 'perl', i.e.
embedded interpreter. I need this to fork/exec child processes in the same
way the parent was started.
Hardcoding 'parl' to parent is not appropriate because I have to keep at the
same place few copies of 'parl' from perl of different architectures, like
parl-sun4u, parl-linux, parl-cygwin, and they may be runnable giving
relative path.
If $^X couldn't be 'parl' for some reason (not found excuse for that) I
think PAR module should at least set some another PAR_... environment
variable telling what was the *real* executable name/path.
Although the perlvar doc on $^X says about perl, IMHO in context of
PAR-based programs ran by 'parl', it should be extended to just 'parl', not
'perl' (note, that if I run 'parl', perl program may even not be present in
the system).
Regards,
Waldemar.
$^X The name used to execute the current copy of Perl,
from C's "argv[0]".
...
You usually can use the value of $^X to re-invoke an <---
exactly my case
independent copy of the same perl that is currently
running, e.g.,
...