Since discovering perlbrew, I'm a happy CPAN user. But what I have never figured out is how to read changelogs of modules. For example, when looking at the outdated ones with "r" in the CPAN shell, I'd like to easily inspect the changelog to decide whether to upgrade or not.
Of course I can download the module, unpack it, and hunt around for a changelog. But I hope there is an easier way. How do you do it?
I'm using the old CPAN shell. If CPANPLUS or cpanminus support this, I'd consider switching.
I just look on CPAN Search. The main page for each distribution links to the main files, and you can also browse the entire distribution. You don't have to download or unpack the distribution.
You can also use the cpan command's -C switch so you don't have to enter the CPAN.pm shell:
$ cpan -C Some::Module
I don't know of anything that will show you the Changes file at once for all of the outdated modules though. That would probably be a bit of a mess in the terminal. You might be able to rig up something with the -O switch:
$ cpan -O | perl -anle 'print $F[0] if $. > 9' | xargs cpan -C
That's $. > 9
bit is there to skip the CPAN.pm output and the table header. It's ugly for sure.
If you wanted to do something more fancy, you could make that last part of the pipe some script to run cpan -C
individually and save the result to a file. Put all the files in a directory of Changes and Bob's your uncle. That's a lot more work than I care to do. I just update things and look at the Changes later if something breaks.
cpan-outdated
nearly does what you need out of the box:
$ cpan-outdated --compare-changes
Above produces a diff between all your Changes
files and latest from CPAN
for each out dated module you have. However this can be a bit long & messy to trawl through if you have a lot of out dated modules!
Fortunately it only took a few changes to add these options:
$ cpan-outdated --pkg Catalyst::View::TT --compare-changes
$ cpan-outdated --filter-pkg Catalyst --compare-changes
My update can be found on Github here: http://github.com/draegtun/cpan-outdated. Here is the diff of my changes to tokuhirom cpan-outdated
/I3az/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With