I want to INCLUDE a file via http: and the FAQ says:

"Here's one way.  Set the LOAD_PERL option:"

I'd rather not use the LOAD_PERL option... but then the solution is from 2001 and someone has come up with a better solution since then right?

right?

please....?

Oh, in case you haven't seen the FAQ here's the solution:

        use Template;

        my $template = Template->new({
            LOAD_PERL => 1
        });
        $template->process("example.tt", { stdout => *STDOUT })
                                     || die $template->error();

    and then use LWP::UserAgent and HTTP::Request:

        [%
            USE ua = LWP.UserAgent;
            ua.proxy("http", "http://your_proxy/";);
            USE req = HTTP.Request("GET", "http://www.cpan.org";);
            ua.request(req).content;
        -%]


Thanks!!

Tosh

--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/


_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to