So, set up a different installation area. How hard can that be? | [reply] |
Wrong, wrong, and wrong again. If I run "test Module" through the CPAN module and Module depends on Module2, then Module2 will be installed into the installation area specified by my .cpan/Config.pm (or the main Config.pm, if that doesn't exist). That is the only way the CPAN module knows to satisfy a dependency.
I guess you have a different CPAN.pm than I have. Just did a test, tested a module with a dependency. It gets the dependency, builds it, runs its tests, does not install it, builds the module I requested for testing, prepends the directory it builded the dependency in to PERL5LIB, then runs the tests for the requested module. No installations happen.
It's easily tested that it hasn't installed the dependency - if you repeat the command, it will fetch and build the dependency again.
Here are the specifics I did:
$ su - # Become root.
$ chmod 000 /opt/perl/lib/site_perl # As root.
$ ^D
# Normal user again. No LWP and a whole lot of dependencies available.
$ rm -rf ~/cpan/build/* # Clear cache
$ perl -MLWP -e1
Can't locate LWP.pm in @INC (@INC contains: ...)
$ perl -MCPAN -e'test "LWP"'
...
Prepending /home/anonmonk/cpan/build/Compress-Zlib-1.34/blib/arch /hom
+e/anonmonk/cpan/build/Compress-Zlib-1.34/blib/lib /home/anonmonk/cpan
+/build/HTML-Tagset-3.04/blib/arch /home/anonmonk/cpan/build/HTML-Tags
+et-3.04/blib/lib /home/anonmonk/cpan/build/URI-1.35/blib/arch /home/a
+nonmonk/cpan/build/URI-1.35/blib/lib /home/anonmonk/cpan/build/HTML-P
+arser-3.45/blib/arch /home/anonmonk/cpan/build/HTML-Parser-3.45/blib/
+lib to PERL5LIB.
...
All tests successful, 4 tests skipped.
# Note, no installation. No attempts to installation either.
$ perl -MLWP -e1
Can't locate LWP.pm in @INC (@INC contains: ...)
$ perl -MURI -e1 # One of the dependencies.
Can't locate URI.pm in @INC (@INC contains: ...)
$ ls ~/cpan/build
Compress-Zlib-1.34 HTML-Tagset-3.04 libwww-perl-5.803
HTML-Parser-3.45 URI-1.35
$ su -
$ chmod 755 /opt/perl/lib/site_perl
$ ^D
$ perl -MLWP -e1
$
See? No installation when doing a test. Not even of a dependency. | [reply] [d/l] |