in reply to Re: HTML::Template in a module's __DATA__ section
in thread HTML::Template in a module's __DATA__ section

Actually, the __DATA__ section seems to be read in just fine, hence the syntax error on the template tag. I have tried to test this by printing and examining the contents before sending to the HTML::Template constructor, and it looks perfectly normal. I have solved the immediate issue by just creating a method that returns the template as a scalar, but I am still very curious as to why this did not work as I had expected.

(I also tried using <Foo::DATA> to ensure that the correct package was being read.)

Thanks for the reply, and any other suggestions are welcome.

  • Comment on Re^2: HTML::Template in a module's __DATA__ section