On 7/20/2016 4:04 PM, Steven Lembark wrote:
> On Wed, 20 Jul 2016 11:55:24 +0800
> yhpeng@orange.fr wrote:
>
>> Though I have written several handlers using mp2, but for further web
>> development under modperl, what framework do you suggest to go with?
> Q: What do you mean by "framework"?
>
>> (I have few experience on Dancer, which I don't think work together
>> with MP).
> Frankly, you are better off with Plack and PSGI (a.k.a. Dancer,
> Dancer2, twiggy, etc) than trying to embed anything into apache
> with mod_perl. There are modules for converting mod_perl request
> objects into plack, which simplifies all of your code and makes
> debugging it a whole lot easier (since you can use perl -d
> rather than dealing with mock apache objects).
That isn't the case if you make use of all the nice features of mod_perl
then
there just isn't the support in Plack to do the same thing - you can do
really
nasty coding to get round some of it (and it is nasty).
You don't have the same flexibility in turning on and off phases like you do
in mod_perl - and so you end up with having multiple layers of plack
objects - which adds to inefficiency...
But when it comes to output filters and the like then there really isn't an
equivalent in Plack to achieve the same flexibility...
We have applications in perl, javascript (node), java and php which are
hooking into the request phase of a perl server but are wrapped with
mod_perl layers to achieve templating security etc. It is not quick and
easy to do this with Plack in quite as seemless away.
We have also noticed performance issues with many of the Plack
implementations
they are great when the traffic is low - but unless you run under mod_perl -
they don't tend to cope with large (heavy request) traffic as well as
mod_perl.
this
>
> If you have to run code w/in apache then try the PSGI interface:
>
> <https://github.com/spiritloose/mod_psgi/>
>
> You can test the code with perl -d and run it in anything from
> twiggy to starman to apache when you are done.
>
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.