Packaging Perl Mojolicious web application
Asked Answered
S

1

5

I've written a small web application in Perl and I want to package it up so others can use it. My application has the following components

  • Various Perl modules from CPAN

  • My own modules

  • A MySQLdatabase

  • Apache2 configuration

I'm not really sure where to start. Any help is much appreciated

Studied answered 15/2, 2013 at 12:21 Comment(0)
A
7

Submitting a module to CPAN is easy once you get the hang of it, but at first it takes a while to learn. There are several guides to help you, but choose one that was written within the last few years. Here is one: http://www.perlmonks.org/?node_id=879515

You will need to learn at least a little bit about one of the build tools. I like Module::Build, some others like ExtUtils::MakeMaker (I don't personally) or the pseudo-tool Dist::Zilla which may be used to ease the process of using the previous.

I might suggest trying to releasing a tiny toy module under the Acme:: namespace to try things before uploading your real module.

Look at some of the dists written by your favorite authors to see what they do. For example mine are here or here including my Mojolicious app Galileo.

Finally, as documented here, to make a Mojolicious app installable you need to move your static files into an installable location. I have made a plugin which can help (if you follow its recipe) called Mojolicious::Plugin::InstallablePaths.

Good luck!

P.S. if you comment with a link to a github repo I would be happy to make some comments (but you will still have to do the heavy lifting of course :-) )

Approximal answered 15/2, 2013 at 14:16 Comment(1)
Hi Joel, Thank you very much for your detailed and very helpful response. I'm very new to coding in perl, so my code is rather embarrassing in comparison to your efforts :). But you have provided me with a wealth of information so that between my fulltime job and other studies I will hopefully be able to improve and deploy my little webapp. cheers!Studied

© 2022 - 2024 — McMap. All rights reserved.