Home: Perl Programming Help: Advanced:
How to build Perl scripts into a deliverable package

New User

Jun 28, 2011, 4:32 PM

Views: 3388
How to build Perl scripts into a deliverable package

I work on a development machine creating scripts that are then run on other machines. My problem is that I have no way of ensuring that when my script runs on the other machine, it will be using the same version of the various packages I've downloaded from CPAN. For example, the newest version of DATE::Manip won't handle some date strings that an earlier version would.

When I'm developing in Java and using .jar files of code from hither an yon, I can build my code plus all the .jar files it depends on into a single installable image, using the program nsis.

What I would like is some way to do the same thing with my Perl code, i.e. suck up my code plus all the other .pm files my code depends on, wrap it all up in a single tarball (or whatever), so that it can readily be inflated wherever it is installed.
(Hmm, it just struck me that there could be an issue with compiled native code. I hadn't thought about that.)

Does any such beast exist?

(I've tried a bunch of searches here, but unfortunately searching for words like "build" and "package" isn't very productive.)

Topher Eliot

Veteran / Moderator

Jun 28, 2011, 6:18 PM

Views: 3386
Re: [tgeliot] How to build Perl scripts into a deliverable package

Use the pp utility from the PAR::Packer module to package your app as a standalone executable.