in reply to Re^2: Template Toolkit output to a scalar?
in thread Template Toolkit output to a scalar?

Open-scalar-as-file is only in fairly recent Perls though (5.8 perhaps?). So if your code has to be portable (such as a CPAN submission), don't do that... yet.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re^3: Template Toolkit output to a scalar?

Replies are listed 'Best First'.
Re^4: Template Toolkit output to a scalar?
by Tanktalus (Canon) on Jan 17, 2005 at 17:28 UTC

    Definitely 5.8. You can do something similar with IO::Scalar with 5.6 - I've got code that checks the perl version, and if 5.8, uses the \$scalar trick, but if 5.6, uses IO::String. Which, of course, doesn't actually come with 5.6, but if you are making a CPAN submission, you can easily put a pre-req on IO::String. Maybe not quite as easy to do if you only want the pre-req for 5.6, but still possible.