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

lee latham rasto at cm4msaa7.com
Thu Aug 25 17:15:26 PDT 2011


John,

Unfortunately I don't know Dancer or PAR::Packer, but if I was trying
to find the problem I would:

1. Telnet to port 80 on the device running your executable, and see
what it tells you, if anything.

2. Is there a log file for your app?

3. Do any of the OS logs record anything when you try to hit it with a
browser (such as iptables messages).  Running a browser on the machine
itself and trying to hit it would also be interesting (such as lynx if
it's cli only Linux or something).

3. Definitely I'd slap an strace on the executable while it's running
and have a browser attempt to connect.  Lots of hidden error messages
can be found that way.

Hopefully you're running on a unix-y OS and have access to strace.
I'm sure there's something similar for Windows though.

lee

On Thu, Aug 25, 2011 at 10:20 AM, John Ellyson <jellyson at gmail.com> wrote:
> 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.)
>
> _______________________________________________
> Houston mailing list
> Houston at pm.org
> http://mail.pm.org/mailman/listinfo/houston
> Website: http://houston.pm.org/
>


More information about the Houston mailing list