On Oct 28, 2005, at 7:59 PM, Dave Linton wrote:

I'm attempting to use CPAN for the first time ...

CPAN builds by default a directory structure under .cpan in my home directory.

... for its own use. That's where tarballs (.tar.gz files) are downloaded to, unzipped, configured, and built before being installed. You should consider the .cpan directory an "internal detail" of the CPAN module. The CPAN module will manage it for you, cleaning up old files when it gets bigger than the space limit you've configured.

Perl looks for its include files in (i.e. @INC contains):
    /System/Library/Perl/5.8.1/darwin-thread-multi-2level
    /System/Library/Perl/5.8.1
    /Library/Perl/5.8.1/darwin-thread-multi-2level
    /Library/Perl/5.8.1
    /Library/Perl
    /Network/Library/Perl/5.8.1/darwin-thread-multi-2level
    /Network/Library/Perl/5.8.1
    /Network/Library/Perl

How do I set up CPAN so that once a bundle is fetched it is put in one of the libraries listed above so it can be 'use'd correctly?

I think you've overestimated the amount of magic in CPAN. All it does is download the module, unzip it, and run "perl Makefile.PL; make; make test; make install". The location to which modules will be installed is determined by Perl's configuration, and is the same whether you use CPAN.pm to run those commands or run them yourself from a shell prompt. (More to the point, you *don't* need to "set up" anything to get modules installed in their proper locations, because Perl *already* knows where they need to be installed.)

Where CPAN *really* shines is in managing dependencies. If you want to install module Foo, but it depends on module Bar, which depends on module Baz, CPAN will sniff that out, and the find the latest versions of all those modules as well. It automates the more tedious job, but the end result is no different than if you'd downloaded the tarballs by hand and run the same sequence of commands manually.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

Reply via email to