modiff: The Perl Module Differ
Here's something else I wrote (like acuff) for working on Apache/Perl installations, particularly unfamiliar ones: modiff, the Perl module differ.
Say you need to update a certain Perl module. You check out the latest version, make your edits, "make install", and everything's great. Usually. Only this time you've just overwritten a hack that guy who got laid off never committed 6 months ago, and now everything's broken. Even rolling back to the previous svn revision can't save you now.
You should have run modiff first:
% cd ~/project/Really-Important-Module && svn update && modiff U lib/Really/Important/Module.pm Updated to revision 32767. *** /usr/local/lib/perl5/site_perl/5.8.7/Really/Important/Module.pm Tue Apr 1 16:59:59 2008 --- lib/Really/Important/Module.pm Wed Jan 7 20:35:37 2009 *************** *** 2,9 **** sub init { my $self = shift; ! # $self->{conf} = parse_config('/etc/x.conf'); ! # This always bombs. Comment out until I figure out why return 1; } --- 2,8 ---- sub init { my $self = shift; ! $self->{conf} = parse_config('/etc/x.conf'); return 1; }
I first wrote modiff in Ruby but I eventually needed to use it on a server that did not have Ruby, and you probably will too. The version here is the sensible Perl rewrite.
Note that modiff works only if your module's source is in CPAN-style where *.pm files are under lib/. For nonstandard directory layouts or detecting changes to other files like *.pod or anything XS-related, you're on your own.
October 5, 2009 update: modiff is now part of my "futilities" collection on github.