Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: SSI includes vs. require

by kutsu (Priest)
on Apr 05, 2006 at 18:13 UTC ( [id://541471]=note: print w/replies, xml ) Need Help??


in reply to SSI includes vs. require

For one virutal includes just run the cgi-script and print the output so you can't specify a sub (well you could with some params, but that could get convulted). Secondly virtual includes are more for html files that don't have execute permission already, and are nice for including html templates (like a header file) for example, and will proably just cause a syntax error in a cgi script (will when testing over the command line at least). Require just includes the perl-script in a perl script so you could call the subs normally like they were in the same file.

You should look at Simple Module Tutorial for an even better way to include separate sub routines in multiple perl-scripts. Oh, Welcome to Perlmonks too :).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found