in reply to How and where to pass PERL_USE_UNSAFE_INC=1; to Perl while compilation.

Hi Monks, Thank you for the reply.
I did try to add SET PERL_USE_UNSAFE_INC=1; in the batch being used to install the application but it didn't work.
Batch file has path for perl.exe set, can I add it in the batch file itself to set it up? So that other perl scripts in the batch files would get the required files while installing the application.
Thank you.
  • Comment on Re: How and where to pass PERL_USE_UNSAFE_INC=1; to Perl while compilation.
  • Download Code

Replies are listed 'Best First'.
Re^2: How and where to pass PERL_USE_UNSAFE_INC=1; to Perl while compilation.
by syphilis (Archbishop) on Sep 25, 2021 at 05:57 UTC
    I did try to add SET PERL_USE_UNSAFE_INC=1;

    Oh ... I wasn't expecting that you're on Windows.

    It's the ";" at the end of you're "SET" command that's screwing things up:
    C:\>set PERL_USE_UNSAFE_INC=1; C:\>perl -le "print for @INC;" C:/perl-5.34.0/site/lib/MSWin32-x64-multi-thread C:/perl-5.34.0/site/lib C:/perl-5.34.0/lib/MSWin32-x64-multi-thread C:/perl-5.34.0/lib C:\>set PERL_USE_UNSAFE_INC=1 C:\>perl -le "print for @INC;" C:/perl-5.34.0/site/lib/MSWin32-x64-multi-thread C:/perl-5.34.0/site/lib C:/perl-5.34.0/lib/MSWin32-x64-multi-thread C:/perl-5.34.0/lib . C:\>
    Cheers,
    Rob
      HI Rob, Thank you for pointing this out and trying it, it worked !!!

      To have persistent env variable created i just used setx later on instead of set.

      Regards