[Purdue-pm] help!

Bradley Andersen bradley.d.andersen at gmail.com
Wed May 16 09:05:16 PDT 2012


I have an HTML file that is composed of other HTML files, something like
this:

<div data-role="collapsible" data-collapsed="true">
  <h3>Blah Blah</h3>
    <TMPL_VAR m10>
</div>

now, m10 is just an HTML file somewhere, read into the template like so:

open(FH, "$base/m10.html");
$tpl->param("m10" => do { local $/; while (<FH>) { my $next = <FH>; } });

the $next bit is to ignore the first line, which has css info that I don't
want this version to see ...

I swear this was working, and now it has mysteriously stopped working :(

Here's what Dumper tells me:

[Wed May 16 19:54:13 2012] [error] [client xx.xx.x.xxx] FastCGI: stderr:
$VAR1 = bless( do{\\(my $o = '')}, 'HTML::Template::VAR' );

Looks to me like it simply is not reading the file into the tpl param.

Anything obvious I am missing? Is this so hacky that it would work
yesterday and then mysteriously stop today? Is there a better way to read
the file into the tpl var? Keep in mind I have about 70 such files going in
to this one tpl, and I read them all in using a loop, so, where it says
"m10" up there, it could be really m$anything.

Thank you,
/bda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/purdue-pm/attachments/20120516/9f110538/attachment.html>


More information about the Purdue-pm mailing list