Friday, March 25, 2011

Perl Module Tricks

To check the existence of a module, if the following completes with no errors, it's installed...

perl -MXML::Simple -e 1

To get the version of a module...

perl -MXML::Simple -e 'print "$XML::Simple::VERSION\n"'

Removing a CVS sticky tag

Yes, I'm sorry to say, I still have to use CVS for some tasks. We've talked about upgrading to SVN, at least, but I doubt it will happen soon. To remove a sticky tag and update a file to the latest revision (HEAD), use the following...

cvs update -A filename