I've installed Apache::SessionX and configured it to use DB files (because this seemed like it would be the simplest test).
The install went OK after a few hiccups, but when I switch the pages to us the new Embperl (change HTML::Embperl to just Embperl) I get the following errors in the logs:
[20481]ERR: 24: Error in Perl code: syntax error at MEM:MEM: line 27, at EOF
[20565]ERR: 24: Error in Perl code: syntax error at MEM: line 25, at EOF
[20565]ERR: 24: Error in Perl code: syntax error at MEM:MEM: line 27, at EOF
[21067]ERR: 24: Error in Perl code: syntax error at MEM: line 25, at EOF
[21067]ERR: 24: Error in Perl code: syntax error at MEM:MEM: line 27, at EOF
[21068]ERR: 24: Error in Perl code: syntax error at MEM: line 25, at EOF
[21068]ERR: 24: Error in Perl code: syntax error at MEM:MEM: line 27, at EOF
[Wed Jan 10 10:44:18 2007] [error] [21566]ERR: 24: Error in Perl code: Can't call method "pid" on an undefined value at? line 3.
[Wed Jan 10 10:44:18 2007] [error] [21566]ERR: 24: Error in Perl code: Missing right curly or square bracket at? line 164, at end of line\nsyntax error at? line 164, at EOF
[Wed Jan 10 10:44:18 2007] [error] [21566]ERR: 24:?(1): Error in
Neither I nor Google seems to know much about syntax errors at MEM:MEM. I'm guessing it's dynamic code stored in memory?
Any help is appreciated. I'm pretty stumped at this point.
The errors in my OP are apparently not caused by a configuration problem with Embperl 2, but by the fact that Embperl handles files differently. A lot of out existing template files are throwing errors, for reasons including:
- By default, Embperl 2.2, validates HTML for well-formedness, so was getting errors about tags in the wrong place. But this functionality can be [turned off¦http://www2.ecos.de/~mailarc/embperl/2005-09/msg00051.html]
- Variable scoping inside [* *] tags works differently. Namely, we were getting errors that lexical variables were being redefined in the same scope. (That looks like the template files will just need to get fixed.)
- The time that Embperl sends its output seems to have changed. Under 1.0, sub-templates included in the middle of the page-template would be output in the order they appeared. Now they are appearing at the top. Apparently, Embperl is sending its output upon completely parsing the template.
Changing this last behavior would help a lot. I've been Googling for the Embperl 2 equivalent to $¦=1, without success.
Anyone?
In older versions of Embperl you could flush the output of the buffers to screen, but Embperl 2 doesn't allow that. The site was calling Embperl directly from inside Embperl files, and that caused a problem in the order the files were output. We'll have to replace those calls with [+ +] tags.
In short, Embperl 2 seems to be a lot stricter as to what it will accept than version 1.