[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Found the problem with ValidateRM & Template


As mentioned before, I could not get ValidateRM working with Template.pm's templates within CGI::Application. I can now.

I narrowed the problem down to the check_rm() sub in ValidateRM, and I know that $err_page is returning empty, so is not triggering the error page for Template-generated templates.

The reason for this is in the nature of $return_page. For H::T-generated templates it is scalar data (ie the complete HTML return page), but for Template-generated templates it prints out as 'SCALAR(0x1bfa330)'. As it says in the CGI::Application::Plugin::TT docs for tt_process() 'The return value will be a scalar reference to the output of the template.'

I have produced a temporary 'patch' to my local copy of ValidateRM to enable Template to work:

scalarref => ref $return_page ? $return_page : \$return_page

but I think this is not the best solution here, and also I do not have edit access to the Perl libraries on my production systems. Has no-one else found this before?
--
Richard Jones
Leeds, UK
mailto:suppressed

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.