laziness, impatience, and hubris | |
PerlMonks |
Freeze @INC?by Surge (Initiate) |
on Jul 24, 2008 at 18:56 UTC ( [id://699950]=perlquestion: print w/replies, xml ) | Need Help?? |
Surge has asked for the wisdom of the Perl Monks concerning the following question: 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.
Back to
Seekers of Perl Wisdom
|
|