hmmm....

Dh-make-perl Will Rock Your Socks

dh-make-perl is the most awesome Debian package /ever/.

dh-make-perl —cpan Some::Module —build sudo dpkg -i libsome-module-0.1-1_all.deb

Done.

Dependencies

If you have apt-file installed and Some::Module requires Lib::Foo for which a Debian package is available, the dependancy will automatically be created. If Lib::Foo does not have a Debian package already available, you will likely need to manually run dh-make-perl on Lib::Foo first.

I haven’t seen the apt-file trick mentioned elsewhere. Honestly when someone mentioned it on IRC I didn’t believe him. Sure enough, looking at the source for dh-make-perl revealed that it does indeed check apt-file for each module that Some::Module lists as required in the META.yml.

Why?

Now dpkg/apt know that you have Some::Module installed. If an official package for Some::Module comes out, it will likely have the same name and if it is for a newer version of Some::Module aptitude upgrade will automagically upgrade you to it. The real win is ease of cleanly uninstalling though. How many times have you found what you thought was the perfect module for task XYZ and installed it. Only to find that it isn’t so hot 5 minutes after beginning to use it. Making sure ‘make uninstall’ really uninstalled every thing can be a pain.

Comments