|Do you know where your variables are?|
Adding to legacy application: does it make sense to use PSGI in CGI modeby hotpelmen (Scribe)
|on Mar 02, 2021 at 03:07 UTC||Need Help??|
hotpelmen has asked for the wisdom of the Perl Monks concerning the following question:
There's a 20 yr old Perl/CGI web application that currently runs on Apache 2.4 and uses Perl 5.16. Linux box it runs on has one IP address and has no associated domain name.
It is still being actively used inside my company by a dozen of employees, and I was asked to add a new page to it (standard interaction with database and displaying of results in the browser). I may have to add a page or two again within a year or two, so looking ahead I want to use something better and newer than 'use CGI' and print.
Looks like in my situation I can't just add Dancer2-based scripts to legacy application as Dancer's routing seems to require a separate VirtualHost that I can't create in this no-domain single-IP situation. So I am thinking to use middle path: Template for HTML part of it, and I was advised to use PSGI in CGI mode for interacting with Apache instead of using CGI.pm.
Using PSFI in CGI mode looks easy to do, but I am new to it and I am trying to avoid any path that may make me regretful later. Based on your experience and wisdom, what will be the immediate benefits of using PSGI/Plack for the new page, and is there anything I should beware of? Other thoghts?