Praethen has asked for the wisdom of the Perl Monks concerning the following question:
I'm fairly certain I'm doing this in the less than perfect way but at the moment I'm seeking a working solution, not necessarily the right way.
My site primarily uses SHTML (that is simple HTML files with the SSI Include element thrown in to insert template elements). Now I've added CGI form processing and would like to just output the success page.
I initially just ordered a $q->redirect($success_page) using CGI but in testing it's redirected me before completing the file upload.
More importantly, I don't seem to be handling errors as gracefully as I would like. I would like to be able to pull my template elements (header file, footer file, etc.) into the Perl CGI processing script to print when I have an error but I cannot do a simple 'open file, print it' dump because I use SSI includes in those files. I don't know how to do execute that the internal SSI in those pages (for example the footer file utilizes a SSI include of the site map).
In other words, I'd just like to have the Perl script completely handle the success or failure of the page and work like my SHTML files by being able to execute those files SSI.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print SHTML from inside Perl Script
by Anonymous Monk on Nov 10, 2011 at 09:28 UTC | |
by Praethen (Scribe) on Nov 10, 2011 at 09:33 UTC |