in reply to Configuring default @INC

read the source

Replies are listed 'Best First'.
Re^2: Configuring default @INC
by Anonymous Monk on Mar 01, 2017 at 01:24 UTC
      Oh, well, that sucks. Have to go to the source code and even then only in the very latest development version. At least I know now, thanks for the link.

        If you can muster the patience to wait until May 2017, it's highly likely that the feature to exclude the current directory from @INC will have made it into 5.26, which is set to be released then.

        Oh, well, that sucks. Have to go to the source code and even then only in the very latest development version. At least I know now, thanks for the link.

        Well, you can always turn on taint, which will remove . from @INC, but most code isn't prepared to deal with taint so ...

        Well, you don't have to go to the source in the latest version, its a configuration option, you just gotta configure the configuration

        For arbitrary older versions, all you do is "backport" from the current version, which all it really is applying a patch, which you produce from the current dev version ... but thats only if you want to have a configuration option like the latest version

        Removing "." from @INC can be as simple grepping the source (perl.c) and commenting out   S_incpush(aTHX_ STR_WITH_LEN("."), 0);