>
> Latest-and-greatest is fine until you need to install some software
> that requires the not-so-latest-and-greatest.  Also, the latest-and-
> greatest is more often the latest-and-broken.  So it would be nice to
> install version N-1 sometimes.
In that case, you specify which version you want:
"But if you would
        like to install version 1.23_90, you need to know where the  
distribu-
        tion file resides on CPAN relative to the authors/id/  
directory. If the
        author is BAR, this might be BAR/Foo-1.23_90.tar.gz; so you  
would have
        to say

            install BAR/Foo-1.23_90.tar.gz
" (perldoc CPAN)

>
> My only issue with cpan is that it is not really a package management
> system like yum+rpm or apt+dpkg.  Or is it and I'm ignorant of what
> cpan can do?

CPAN maintains a simple database of installed modules. It's not quite  
a package management system- it's more of an automatic downloader and  
installer.

It works everywhere- it's trivial to write an installer script which  
installs relevant modules. If you mix that with yum...not so  
easy...especially if you want to move across distros...

> For example, with cpan how can I do the following:
>
> - install pre-compiled binaries of the modules.  Time spent compiling
> is time not spent doing something else.
CPAN won't do it- it would have to keep binaries for the hundreds of  
possible configurations.

CPAN also runs tests to ensure everything is hunky-dory. Switch  
terminals to do something else or run CPAN in the background.

> - query to list the currently installed modules with versions, files,
> and file locations
perldoc -l will print the location of a module.
To get lists of installed modules (whether installed with CPAN or not):
http://perl.org.il/pipermail/starter/2004-April/000018.html or  
perldoc -q installed
Also see:
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod (with  
adjustments for your perl) for what CPAN has done.

> - uninstall a modules.  This is most important when cpan fubars
> something up.
CPAN doesn't do this because the modules suggest their own  
dependencies. Go into ~/.cpan/build/ModuleX and run "make uninstall".  
You can however install a newer version over an old one.

> - query dependencies, that is, if I remove module X what other
> modules will break
The dependencies are stored in the packages so CPAN doesn't know.

> In short, can I do with cpan for perl what I can do with yum for rpms
> or apt for debs?
Probably not everything. But the repos might not have the modules you  
need- or, if they do, might conflict with CPAN's procedures. A lot of  
flexibility is given to perl module maintainers- there are many  
different possible way to build and distribute a package. CPAN is  
basically a downloader with "perl Makefile.PL;make;make install".

> The other thing that kinda irks me about cpan is the docs, or rather
> lack thereof.  'perldoc cpan' is a whopping 85 lines; 52 lines if you
> remove the blank lines.

"cpan" is the command-line wrapper for CPAN.pm. You are looking for  
"perldoc CPAN". While CPAN isn't exactly the bee's knees, it does  
what it needs to do in a cross-platform fashion.

Good luck!

M

|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
AgentM
[EMAIL PROTECTED]
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-

 
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/

Reply via email to