in reply to Re: @INC not reflecting correctly
in thread @INC not reflecting correctly
I expected that command to fail because Math::BigInt does not exist in any of those @INC directories that are listed. (It exists only in one of my original @INC directories.)C:\>perl -MMath::BigInt -le "print 'PERL5OPT: ' . $ENV{PERL5OPT};print + for @INC; " PERL5OPT: -MMy_INC /ajperznes/perl/localperl /ajperznes/perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32.0 /ajperznes/perl/lib/site_perl/5.32.0/x86_64-linux /ajperznes/perl/lib/site_perl/5.32.0 /ajperznes/perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32.0
But instead it processed the -MMath::BigInt before it processed the -MMy_INC. That is, it does the same as:C:\>perl -MMy_INC -MMath::BigInt -le "print 'PERL5OPT: ' . $ENV{PERL5O +PT};print for @INC;" Can't locate Math/BigInt.pm in @INC (you may need to install the Math: +:BigInt module) (@INC contains: /ajperznes/perl/localperl /ajperznes/ +perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32.0 /ajperznes/pe +rl/lib/site_perl/5.32.0/x86_64-linux /ajperznes/perl/lib/site_perl/5. +32.0 /ajperznes/perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32 +.0). BEGIN failed--compilation aborted.
Is it possible to have perl process the contents of PERL5OPT *before* any -M... command line switches are processed ?C:\>perl -MMath::BigInt -MMy_INC -le "print 'PERL5OPT: ' . $ENV{PERL5O +PT};print for @INC;" PERL5OPT: /ajperznes/perl/localperl /ajperznes/perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32.0 /ajperznes/perl/lib/site_perl/5.32.0/x86_64-linux /ajperznes/perl/lib/site_perl/5.32.0 /ajperznes/perl/lib/5.32.0/x86_64-linux /ajperznes/perl/lib/5.32.0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: @INC not reflecting correctly
by swl (Prior) on Aug 27, 2021 at 05:20 UTC | |
by syphilis (Archbishop) on Aug 27, 2021 at 09:30 UTC | |
by swl (Prior) on Aug 27, 2021 at 23:55 UTC | |
by syphilis (Archbishop) on Aug 28, 2021 at 04:22 UTC | |
by haj (Vicar) on Aug 28, 2021 at 09:55 UTC | |
| |
by bliako (Abbot) on Aug 28, 2021 at 04:58 UTC |