Well, no luck with chatterbox, so I guess I ask it here.
When building perl (I'm actually installing with plenv), how do I remove curdir (i.e., ".") from the default @INC? I don't mean no lib "." or anything like that, I mean perl -V shouldn't show it at the bottom.
You can stop reading here unless you like other people's whining.
For some reason, I can't make DDG or any other search engine return anything except how to add things to @INC at run time. Is that really a thing people don't know how to do? It's in the FAQ for Wall's sake! If you want to *add* directories during Configure http://search.cpan.org/perldoc/INSTALL tells you all about it and a million other things. Yet not a word on *removing* directories.
Why is curdir even included in the default @INC in the first place? How often is your cwd a perl library root! I'm thinking... approximately never. It seems like a security risk to me. It definitely messes up plenv list-modules (i.e., ExtUtils::Installed->new->modules()), which now has to look through whatever your cwd is and all it's descendants for .packlist files. Even if you happen to be located in a directory with thousands of subdirectories and millions of files: "YTF is this list-modules command not returning instantly whenever I'm on my NAS NFS mount?!?" Even if you're in a project directory with multiple local::lib installs: "YTF is list-modules telling me every module in every project is installed, when none of them are installed at this level?!?" Even if you're in $HOME (where plenv lives): "YTF is list-modules telling me every module I've installed for *any* version of perl is installed for *every* version of perl I have?!?"
Ridiculous. Yet I can't find anyone else having this issue because search engines only want to tell me about adding to @INC at runtime. Sigh. I even looked through the Configure script and couldn't find anything about leaving out directories. Hopefully some monk knows the answer. Thanks!
In reply to Configuring default @INC by Thopilt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |