[pm-h] Bundling Dancer app into executable with PAR::Packer

John Ellyson jellyson at gmail.com
Thu Aug 25 08:20:21 PDT 2011


After the last presentation on the Dancer framework, I've been working on
using that for a little project at work.  I went the manual route of
creating the files rather than the using the dancer help script and have
basically the following files:
  - /app.pl
  - /config.yml (just specifying the port right now)
  - /views/ (--> 3 template files)

Running this as a script is working and doing what I want.  (Well, there's
one minor issue, but I'll tackle that one later.)

I tried bundling up the app.pl with the pp utility from PAR::Packer to
create app.exe.  When I run the app.exe, it looks like its working, but I
can't get a browser to connect to connect to it.  I suspect that I might
need to include more files into the par bundling.

Here's the questions that I'm trying to figure out:
  - How do I go about bundling a Dancer application into a stand-alone
executable using PAR::Packer?
  - Is it possible to bundle it so that the config.yml and template files
are outside the executable file so that I can modify their contents for use
without "recompiling" the executable?

Does anyone have any suggestions on how to do either of these?  Or
suggestions on where to start searching?

I've been through the Dancer module's documentation and have spent a few
hours searching PerlMonks and searching via Google with no luck.

John Ellyson

(Disclaimer:  I'm not wanting to create an executable for the purpose of
hiding/encrypting my code.  I was hoping to avoid installing Perl on the
server that I will be running this on.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/mailman/private/houston/attachments/20110825/f673c0a6/attachment.html>


More information about the Houston mailing list