in reply to Perl5lib causes conflict?

You can put
BEGIN { delete $ENV{PERL5LIB} } use lib "<my application folder>/lib";
in your script before loading any modules, or write a wrapper that unsets PERL5LIB before starting your perlscript and use that instead of executing the perl script directly.
Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Perl5lib causes conflict?
by jujiro_eb (Sexton) on Nov 09, 2009 at 14:33 UTC
    Hello Moritz,

    Thanks for the reply. I am in fact using your second method of unsetting PERL5LIB variable through a batch file. Your first suggestion will not work for me because I do not know where my users may install the application ("<my application folder>"). I cannot rely on current folder because the launching of the script can be done from any folder.

    Regards.

    Ash
      If the lib folder has a constant relation to the binary, you can use FindBin (core module) to find he path to the binary, and thus to the lib dir too.
      Perl 6 - links to (nearly) everything that is Perl 6.