Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: SSI includes vs. require

by kutsu (Priest)
on Apr 05, 2006 at 18:13 UTC ( #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 :).


Comment on Re: SSI includes vs. require

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-09-18 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (117 votes), past polls