Which Perl web framework should I use?
Asked Answered
H

6

16

I would like to develop a web application using Perl.

Refer some Perl package (like Strawberry) which is simple to install. Also it should be suitable for the web application.

Howerton answered 21/1, 2011 at 11:2 Comment(5)
Could you clarify your question? Are you looking for a web framework (such as Python's Django or Ruby's Ruby on Rails?) for Perl? (And it is Perl, not PERL).Trauma
And as for simple installation, pretty much everything in Perl is type cpan Package::Name at the prompt (unless you use ActiveState which does packaging differently, but you've mentioned Strawberry).Trauma
i dont know PERL, i just Entered into PERL, am in PHP around 3yrs, so, i can advise to junior, you can do all type of app using php, like login, external plugin integration, FBconnect and so, so that am asking is there anything other then strawberry PERL, that have huge features,Howerton
Are you asking which Perl distribution to choose? (guessing for Windows since you mentioned Strawberry)? Or which Perl web development framework to choose?Newsman
Can we get an update to the answers here?Inurbane
E
31

Have a look at Mojolicious, a complete and modern framework for Web applications whose only requirement is Perl (no additional modules required!).

To install it, just download a Strawberry Perl version and issue cpan Mojolicious: no dependencies required. Or, download the latest tar.gz for Mojolicious, unpack it, and perl Makefile.PL && make test install.

With it, you get a Modern Perl web client, server, MVC framework, plugins, websockets, templating engine... you name it, and the only requirement is Perl (5.8.8+).

Alternatively, have a look at Catalyst, which has a bit more requirements than Mojolicious but also has a couple books out, and a bigger community behind it.

You can install all sorts of Modern Perl goodies having a look at Task::Kensho. Its purpose is to have all Modern Perl modules one uses to develop web applications, etc. If any of the prerequisites don't install, file a bug report as it is supposed to Just Work

Electrojet answered 21/1, 2011 at 11:16 Comment(2)
mojolicious is very easy to install - I've even managed to get it installed on xampp https://mcmap.net/q/747304/-installing-a-perl-module-from-cpan-on-xampp-for-windowsDraggletailed
Is Mojolicious still to top choice in 2020?Inurbane
A
22

Try out Dancer - Effortless Web Framework. It is very easy to use.

#!/usr/bin/perl

use Dancer;

get '/hi' => sub {
    "Hello World!"
};

dance();
Anapest answered 21/1, 2011 at 13:38 Comment(0)
T
6

For starters, I always recommend looking at CGI::Application with HTML::Template as the templating engine. Simple enough to install and start with, lightweight and still packed with enough punch to keep everyone (well almost) happy!

Tyeshatyg answered 21/1, 2011 at 15:19 Comment(1)
Because a cgi::app is a single class (with each page being a method) you are able to inherit a new cgi::app from an old one. This is super useful as you can create a generic site with lots of common methods in it (login/logout etc) and inherit that for each new site.Draggletailed
I
4

About 10 years ago, I was busy doing full time web app development with Embperl 2.0 betas. It was certainly nice to work with at the time. It seems to have been maintained with bug fixes etc since then, but fundamentally hasn't changed much since then.

A few years ago I researched all the Perl WAFs but didn't find anything really appealing. At work, we are using Python+Django but there doesn't seem to be a solid Perl version.

Thus for any quick & dirty web project I'm still resorting to just good old CGI.pm. I'm still a Perl guy at heart.

At the moment I'm again researching all the latest Perl toolkits and Mojolicious with DBIx::Class certainly seeems to be the way to go!

What I haven't found an answer for yet is how to easily build rich user interfaces for database applications with Mojolicious, without having to worry much about generating HTML tables and doing usual CRUD.

Indefatigable answered 16/4, 2011 at 19:31 Comment(0)
H
2

I do recommend Mojolicious, especially their micro framework Mojolicious::Lite, which gets you started pretty fast. It doesn't have the kind of documentation like Catalyst, but it is growing. No dependency, other than core Perl, should ease the pain of getting you started.

Handmaiden answered 21/1, 2011 at 18:25 Comment(0)
S
2

Embperl is still being maintained, although it is kinda quiet on the mailing list.

Embperl might be an option for small sites.

It is conceptually similar to PHP, but more powerful. Fast (due to lots of C bindings), still easy to install (preferably from command line), works best with mod_perl, but a CGI operating mode is also supported.

Though, I haven't used all its advanced features (embedding xml-libs, configuring https, for instance), but it is great to use perl on the data-output side, when you have perl also on the data input side (data staging/scrubbing).

Seer answered 22/1, 2011 at 23:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.