Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: @INC not reflecting correctlyby haj (Vicar) |
on Aug 27, 2021 at 10:07 UTC ( [id://11136120]=note: print w/replies, xml ) | Need Help?? |
So, it seems like you haven't actually installed Perl, you have unpacked a tar from another server. This explains the behavior. The initial list of directories in @INC is created when Perl is built, from data given to the Configure script. They end up "compiled into" the binary (a shared library for most distributions). So, unless the initial installation took care, there's no easy way to copy an installation around. You can fiddle with @INC at runtime as suggested by syphilis but as you see, this looks like a bit of guesswork. Is there any reason why you can't just install Perl on the target server? If you build your own Perl, you can use the configure option userelocatableinc (see Config) to get a Perl where @INC is created at runtime from the location of the binary. BTW: This is not how Strawberry Perl does it. Strawberry's portable editions are using Portable to do the trick, but as syphilis has noticed, you can copy the "non-portable" Strawberry editions on Windows just as well (I haven't figured out how this is done).
In Section
Seekers of Perl Wisdom
|
|