Summary: I would like to capture a complex @INC, so it does not have to be re-built at runtime.
Related: how to include a directory in @INC?
Goals:
Discussion:
I have a scenario, where many module versions are available in many directories. While there exist facilities to add these to @INC, they are only for runtime configuration. I have seen similar issues in the past, where modules where installed in a variety of locations and keeping track of them was too complex. In addition, there is always a risk of a module upgrade breaking existing code.
I would like to either find or write a perl prog, that can take the compiled @INC, delta it with anything brought in by PERL5LIB/PERLLIB, various 'use's and any other @INC hackery (which would be separately defined) and create a perisistent snapshot of the config, for example, in a single directory tree of symlinks. Subsequently, I would be able to run perl with PERL5LIB set to this directory and forget all the @INC hackery, as well as achieve the other goals above.
Is this a reasonable idea?
Does something like this already exist?
Is the suggested implementation approach of collecting symlinks in a single tree a reasonable one?
The only shortcoming to the above may be that it would only have utility on *nix and the like due to symlinks.
Thanks for the forthcoming wisdom.In reply to Freeze @INC? by Surge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |