Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Using a template

by gryphon (Abbot)
on Mar 14, 2003 at 16:39 UTC ( [id://243111]=note: print w/replies, xml ) Need Help??


in reply to Using a template

Greetings shanestyle,

Simple answer: You could require your settings file from your Perl CGI script. First, create a settings.pl file. Insert into that file whatever settings, subs, whatever that are shared by your various CGI scripts. Then require settings.pl; from each of your CGI scripts. require is not exactly the same as use, so read a bit in the docs about require for additional info.

Better answer: Take a look at HTML::Template. It sounds like your situation may be really helped by that. Without knowing more specifics about your situation, I can't answer more directly. However, I can tell you that after having adopted HTML::Template, I can't code any other way.

gryphon
code('Perl') || die;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (9)
As of 2024-04-18 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found