in reply to Re^4: Disputation of g0n on the power and efficacy of XS
in thread Disputation of g0n on the power and efficacy of XS

This assumes, of course, that you don't mind potentially having a bazillion new modules installed somewhere on your machine.
I fail to see what the problem is. Note that I wrote "test Module". Not "install Module". It means that dependencies get installed in your CPAN build area. If you're done, it's just a matter of removing the build area. Of course, if you decide to install the module, and said module has a bazillion dependencies, you'll have to install them. If you don't want to, it doesn't really matter whether there's an XS dependency.
It also requires that the machine you're working on has a direct connection to the Net.
No it doesn't. There are many scripts floating around on the net that will create you a "lite-CPAN" - which contain all the modules of CPAN, but the most recent version only, and doesn't include full perl distros. The result is small enough to fit on a CD. Of course, you can figure out the XS dependency from you net connected PC as well. Note also that getting the modules from CPAN is a problem unrelated to any XS depencies. If there wasn't an XS dependency, you still need to get them.
  • Comment on Re^5: Disputation of g0n on the power and efficacy of XS

Replies are listed 'Best First'.
Re^6: Disputation of g0n on the power and efficacy of XS
by dragonchild (Archbishop) on Apr 21, 2005 at 14:35 UTC
    I fail to see what the problem is. Note that I wrote "test Module". Not "install Module". It means that dependencies get installed in your CPAN build area. If you're done, it's just a matter of removing the build area.

    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.

      So, set up a different installation area. How hard can that be?
      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.