Skip to content

Mojolicious

Official Website: CPAN

Blurb:

The Web In A Box!

Longer Blurb:

A next generation web framework for the Perl programming language.
Back in the early days of the web there was this wonderful Perl library called CGI.pm, many people only learned Perl because of it. It was simple enough to get started without knowing much about the language and powerful enough to keep you going, learning by doing was much fun. While most of the techniques used are outdated now, the idea behind it is not. Mojolicious is a new attempt at implementing this idea using state of the art technology.

The Mojolicious web framework is all about minimalism and simplicity. True to its Perlish roots making simple things easy and hard things possible. A project can be started as a single file web application using Mojolicious::Lite and later grow to a well structured Mojolicious application.

How:

Follow the local::lib and PSGI/Plack instructions first.

Then install via:

cpanm Mojolicious

Hello World

Use the mojolicious helper command to generate a Hello World app:

mojolicious generate lite_app
mv myapp.pl app.psgi # the generated script can be our PSGI app

Run it!
Now that your app.psgi file has been created, you can choose any of the deployment options listed on the Plack page.

N.B. I had to manually change the shagadelic line in app.psgi to explicitly choose fastcgi mode when running on the Host Monster test account.

#shagadelic;
shagadelic('fastcgi');

Live Demos:

http://hostmonster.perlsharedhosting.com/mojolicious

4 Comments
  1. fluffy permalink

    The CPAN link points to CGI::Application

  2. Fixed – thanks fluffy

  3. Hey man,

    Do you know how about run Mojolicious::Lite as CGI under Apache Http
    Server?

    I try to make it but I haven’t get a parameter with “$self->param(‘any’);”

    If you know how to, consider post it here or send me an e-mail if you
    prefer.

    Thanks,

  4. You can fine a good simple skeleton for deploying Mojolicious::Lite app on virtual hosting here: http://github.com/yuki-kimoto/mojolicious-lite-cgi-deploy

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS