A Plot Twist

Consequently, I am a heavy user of dh-make-perl. That has evolved consistently over the years and makes automated debianization of (private) Perl code manageable.

The usual incantation is:

dh-make-perl --build TM-IP/

after which it will auto-create the debian subdirectory and will then emulate the installation process to learn about the files involved. Then it will run your test suite and only if that succeeds it will build the .deb file.

Being Offline

I was doing all this on the bus, having no Internet connection. That is relevant as dh-make-perl (or one of its packages) is trying to connect to the Debian/Perl ticket system. And will abort after a timeout.

That's annoying. But it can be suppressed by setting in the environment

export NO_NETWORK=1

It is amazing what you learn when reading the code ;-)

Damned Tests

The other annoying things is that you always have to await the end of the test suite. If you do plenty of testing you are punished with waiting for quite some time.

At every run :-/

But the man page of dh-make-perl will tell you that you can turn off testing:

export DEB_BUILD_OPTIONS=nocheck

Phew. Thanks.

Looking The Wrong Way

The last hiccup I had was that dh-make-perl seemed to look at Makefile.PL first. Maybe this is documented somewhere, but I was already in SHM (Sherlock Holmes Mode).

So - for the purpose of debianization - I commented out the

#$builder->create_makefile_pl();

line before re-running dh-make-perl. Make sure that you do not have a loose Makefile.PL lying around.

Dist::Zilla is a "distribution compiler". It generates a Makefile.PL or Build.PL for you from a simpler configuration file (and a lot of really nice DWIMmery). Unfortunately, it doesn't (yet) support the kind of custom installation targets you describe.