Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Include files using Text::Template and a closure

by crenz (Priest)
on Apr 26, 2005 at 21:40 UTC ( [id://451778]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub _fill_in {
        my ($template, %params) = @_;
    ...
            SOURCE => catfile($templates_path, "$template.tmpl"));
        $template->fill_in(HASH => \%params, OUTPUT => \*STDOUT);
    }
    
  2. or download this
    {include('_header', title => 'Page title')}
    <p>Some text...</P>
    {include('_footer')}
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://451778]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found