Hi, thanks for taking time to respond. Please pardon my lack of experience with Dancer and PSGI, I just started looking into them, and I am sure I misunderstand some of their advantages or requirements to implement.

Here some more details in response to your questions.

When you say "application" what is that? And how is that different from "script"?

By "Perl/CGI web application" I mean a collection of Perl/CGI scripts that are united by sitting in the same cgi-bin directory, sharing some code, and serving common business goal. Different from a single script only in number of scripts.

What does the code look like? How many files comprise that thing?

In each script Perl code uses CGI.pm to get request parameters and prints HTML. mod_perl is not being used anywhere in this. There are probably 50 or so of these scripts implementing 50 or so of pages. I am looking for an efficient way to add 1 more page to that collection. Maybe a page or two in a few months.

Have you ever read CGI to mod_perl Porting. mod_perl Coding guidelines?

No, I have not read it, why, are you recommending to use mod_perl for new pages?

No, Dancer doesn't demands a VirtualHost, where'd you get that idea? Drop in a /cgi-bin/gavotte.cgi and dance at the speed of cgi

I got that idea about VirtualHost from "Running under Apache" section of Dancer2::Manual::Deployment doc. I had an impression that to take advantage of Dancer's features I'd need entire skeleton directory and for that I need VirtualHost so that I could direct traffic to dispatch.cgi. I have not read enough to really understand the whole effort but I got a feeling that trying to fit Dancer2 into an old application will be too much work. However if a new page will be better off when implemented in Dancer2 (as opposed to CGI.pm+Template or PSGI/Plack) then any thoughts supporting it would be appreciated.

So given all that, does my question about use of Template and PSGI/Plack to add occasional pages to old application make more sense?

In reply to Re^2: Adding to legacy application: does it make sense to use PSGI in CGI mode by hotpelmen
in thread Adding to legacy application: does it make sense to use PSGI in CGI mode by hotpelmen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.