How to change @INC in Strawberry Perl?

How can I change @INC forever without changing my scripts in Strawberry Perl?

I know -I , but I don't want to call this switch every time.

+6
source share
2 answers

To add paths, set the PERL5LIB environment variable to these paths.

Note. This will affect all Perl installations that you run when this effect.

Howto: Right-click (My) Computer, Properties, Advanced, Environment Variables, (Above) New. You may need to restart consoles that are already running in order to get the changes.

+12
source

Alternatively you can use:

 use lib /my/other/direcotry 

or

 push (@INC , /my/other/direcotry) 

to change the value of @INC .

-1
source

Source: https://habr.com/ru/post/886807/


All Articles