Your Linux Data Center Experts

perl modules and RPM

Just thought I would share a handy tip on handling perl modules on RedHat/KRUD/Fedora based machines: There is a nifty package out there that turns perl module tar.gz files into src.rpms so you can build and install them.

So why would you want to make perl modules into RPM's? If you don't do so then the RPM system has no idea you have installed perl modules or cares about them. When you do an OS upgrade or a perl rpm upgrade, all your perl modules will stop working (perl modules are installed against the specific version that was there when they were installed). If you make them rpms you will at least be able to know whats installed and what perl modules need to be re-installed on an upgrade.

The process is quite simple. You need the perl-RPM-Specfile rpm from You can find it someplace like:

Then you grab the perl package you want to install, run cpanflute2 on it, rebuild the src.rpm and install the final rpm.

For example:

cpanflute2 HTML-Defaultify-1.01.tar.gz
rpmbuild --rebuild ./perl-HTML-Defaultify-1.01-8.src.rpm
rpm -ivh /usr/src/redhat/RPMS/noarch/perl-HTML-Defaultify-1.01-8.noarch.rpm

As a bonus you also get dependencies, so you know what modules require what other modules via rpm. Also, if you upgrade one you know what others need to be upgraded. Quite a bit handier than having perl manage everything off in it's own little world.

comments powered by Disqus

Join our other satisfied clients. Contact us today.