[cgiapp] CGI::Application or Dancer2, Mojolicious et similar

Martin McGrath mcgrath.martin at gmail.com
Fri Aug 26 06:31:46 EDT 2016


On 26 August 2016 at 10:54, <max.augsburg at gmx.de> wrote:

> Dear everybody,
>
> Sorry for my late reply. Thank you all very much for your answers. I am a
> little bit sad that the main answers seems not see CGI Application as an a
> up-to-date alternative for programming web applications at the moment. But
> of course the development tools in perl has to go forward. For me I will
> start now first with learning CGI (I bought the o'reilly book CGI
> Programming with Perl). I know that the CGI module is for many people also
> not an up-to-date solution any more and it was deleted for this reason from
> the core modules. But for me as a beginner in this topic I think it could
> be helpful to understand the more modern interfaces later (like psgi or
> plack) or the modern frameworks. Furthermore almost every hosting providers
> support the CGI interface so that deploying is much more easy than with the
> more modern frameworks (although there seems to be a solution to deploy
> them as CGI). Last but not least is the core of CGI still maintained
> (except the html functions that I do not use) and over the years very well
> tested and important Perl flagships as Foswiki use it, too.
>
> Perhaps later if I am a little bit more experienced with the CGI interface
> and the CGI module I could help to modernise CGI::Application but at the
> moment I have unfortunately still not the capability for that.
>
> >From the modern frameworks I would prefer Catalyst at the moment because
> it is well documented ( I always like learning with books) and the syntax
> is for my taste the more perlish compared to Dancer2 and Mojolicious. But I
> havn't devoted myself very much to it because for my purposes the modern
> frameworks feel like an overkill..
>
> Again thank you very much for your help,
>

Hi everyone,

Sorry it's taken me so long to reply to this thread. In the near future an
updated version of CGI::Application will hit the CPAN, yes it's long
overdue, a great deal of things going on both at work and in my personal
life. Once this is live it'll close off a few of the open tickets (rt.cpan
and github), I'll then review and prioritise the rest.

I consider the maintenance of the module to be in support of all of the
legacy code which depends upon it, however I agree with previous statements
about using modern frameworks, such as Mojolicious and Dancer2. PRs for new
features are welcome.

Existing CGI::Application code can be ported to run under Mojolicious
easily:

https://github.com/kraih/mojo/wiki/Porting-CGI-Application

Rereading the CGI documentation I think goes as far as it can to suggest
that it not be used for new developments, mentioning that recent updates
can even break backwards compatibility in some places, meaning code
rework/retesting, something which we're all keen to avoid.

https://metacpan.org/pod/distribution/CGI/lib/CGI.pod
https://metacpan.org/pod/CGI::Alternatives

Max, I can understand your decision, CGI.pm is still out there, however a
great deal of the pages I see people link to that teach it's use are out of
date or suffer other issues. The frameworks mentioned above have very good
documentation, even for beginners in web development. IMHO you should
consider looking at Mojolicious::Lite, the brief example on the first page
of the website (http://mojolicious.org/) is a gentle introduction, followed
by well documented tutorials (http://mojolicious.org/perldoc ->
http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial) I don't think
that the learning curve for this is significantly different than the
CGI/CGI::Application combination.

Thanks

Martin


More information about the cgiapp mailing list