...has been brought to me by SSI. Specifically, the problem of trying to include them in CGI output. Naturally the easy options are out.
Simply reading in the file won't work because of further includes. Putting them through an Apache filter has been set as a last resort due to restrictions on the live server. With CGI::SSI the JavaScript doesn't work. The templating system doesn't handle includes. The existing solution--which consisted of a function parsing the SSI and recursively parsing includes--can't handle this new SSI.
I have finally gotten something functional by using LWP to make requests for all the includes (roughly 5 per page), and to return the result for inclusion in the template. I'm not very happy with this solution, but it has to be done by Monday and I was hoping to take the afternoon off tomorrow for my birthday. :(
Better suggestions which don't include multiple HTTP requests to serve a single page are welcome.
I must note that: 1) I had nothing to do with the SSI. 2) This is legacy code and I can't do anything dramatic like make it work in mod_perl overnight, or change the templating system. 3) The JavaScript is not my choice, either.
I seem to be using the world 'hell' in all my journal entries. I wonder why this is.