I have a perl script that starts another instance of perl interpreter, and I want the latter to inherit the original script's @INC.
The actual case is I'm testing (prove -l) a script in a Perl distribution which starts another perl script that requires a module in the current distribution. The latter script would fail to find the module because its @INC does not contain lib. Now in this specific case I can just add -Ilib option to the latter script's invocation when detecting some environment variable, but I'm curious about the more generic solution.
In reply to Re^2: Removing entries from @INC
by perlancar
in thread Removing entries from @INC
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |