use lib qw( @@perlmoduledir@@ );
Now, the application has been ported to Windows. The problem is how to set @INC. Our Windows installer can't do the search and replace in the scripts to modify the "use lib" line in each script.
Setting PERL5LIB would not work because I can't depend on the environment (scripts run from a shell or from a web server). And I have no idea how to set PERL5LIB portably under different versions of Windows. Not to mention rebooting to install something is a hideous idea.
ActiveState, I believe, will read the registry key \\HKLM\Software\Perl\sitelib to set @INC but that would mean that we couldn't have more than one version of our application installed at the same time.
So it would seem the best method would be to set a version specific registry key at install time and have our scripts read the registry to set @INC before calling require to load modules.
Is that the best solution? And can I assume that under Windows there will be a module for accessing the registry available? Something like Win32API::Registry??
Can someone provide guidance?
In reply to Setting @INC on Windows by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |