CPAN classification for new versions

Odud on 2001-12-06T13:39:06

I've been putting some thoughts together at work about how we apply operating system patches - for the HP-UX systems for example you can do some clever things:

1. Get the current patch state and ftp it to HP 2. Go onto their site and analyse what patches you are missing (and any dependencies etc) 3. Collect all these patches together and download them to your server 4. Apply them all in one go

Of course you can specify what sort of patches you are interested in. For example 'CRITICAL' patches are those that can cause data loss or system failures - and these are the ones we are most interested in.

Of course in the perl world CPAN does something similar - you can get a report showing, for all the packages you have installed, if there is a newer version available. But if you want to go further you have to start looking at the README/CHANGES for each individual package (and hope that what the author wrote makes some sense to enable you to decide whether to upgrade or not). And this can be a lot of work if you haven't upgraded for a long time. (And we try to minimise change frequency for our production systems.)

I started wondering if something could be done for CPAN to enable new version to be classified so that you can see if you need to install them - everything from releases that fix serious bugs through minor bugs to added functionality releases.


use look

hfb on 2001-12-06T14:58:47

Use the CPAN.pm API to 'look' at the distributions you ask it to.

e.g.: CPAN::Distribution::look()
CPAN::Distribution::readme()
etc...
Read the manpage for more details

look etc

Odud on 2001-12-06T16:37:07

Thanks - Hadn't used that before - it's better than going to the web site. It still doesn't solve the problem of what to do if you don't understand what the author is saying or (particularly in my case) where there are a lot of new versions and each one has to considered individually. I was after something like

cpan> r critical
or
cpan> r all

I guess the author would have to classify each new release. At least this would enable me to issue "idiot instructions" of the 'go here, type this' variety.

(And avoid explaining a) what Parse::RecDescent is, and b) what I'm doing using it.)

The reasoning behind all this is that we always tend to dumb-down here, perhaps so that we can replace skilled staff by cheaper alternatives.

Re:look etc

hfb on 2001-12-06T18:11:54

You are probably looking for the CPAN::Psychic plug-in that I hear Schwern is working on....

In all seriousness though, there is only so much one can do programmatically. And at least the CPAN.pm 'look' function downloads it for you and drops you into a shell so you can evaluate the module before deciding whether or not you want to install it.

Also, you can create your own bundle, see the CPAN FAQ that noone ever seems to read, for instructions on how to make a 'critical' and/or an 'all' bundle. Then, write a program that iterates through them with cpan.pm and does what you want it to.

Laziness is never a virtue, it's just a convenient side-effect of a bit of good old fashioned hard work somewhere along the line.