I've installed a number of modules into my Strawberry Perl running on Windows XP, such as:
These libraries work fine in my perl code the first time directly after installing each module.
The problem is that every subsequent day I run my scripts they fail with the error:
Can't locate Regexp/Common.pm in @INC (@INC contains: C:/strawberry/perl/lib C:/ strawberry/perl/site/lib C:\\strawberry\\perl\\vendor\\lib .)
I have put all the appropriate paths into environment variables into Windows: PERL5LIB and others such as lib that were suggested on various other answers on stackoverflow and other wesites dealing with module installations. The scripts continue to fail unless I perform the following workaround that I figured out:
Does anyone have an idea why this might be happening? I suspect it may be something specifically related to Windows/cmd or even my company's windows environment setup?
Any suggestions would be appreciated because it is an extremely annoying problem!
Windows does not clear the environment variables daily by default, therefore it's likely something in your corporate settings resetting the environment variables.
If this is the case, you have a few options:
PERL5LIB
directories you want to specify). perl -I
to specify the library at run time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.