I'm planning on writing a number of scripts with mod_perl (which I am new at) that will pull various shared functions from a master function file.

now, my worry is, since these functions are in a different file, they won't 'cache' properly - some other user will call the script, and it'll have a different script's values, etc.

Up until now, I've just been keeping everything in my mod_perl scripts in one file (copy all functions bodily into each .pl file), but that is getting out of hand - I don't want to have to update every file when a function needs to be tweaked. I've found no tutorials or 'simple answers' to this issue.

Does anyone have any tutorials, or even extremely simple sample code bits ("this is the Autoloader common functions file, with one sample commonly used function. This is the script file, and here it is, using and pulling the common function"), that I could take a look at? I know it is a big thing to ask for what is probably a stupid question, but I can't even find an answer in my mod_perl books..

Thank you so much in advance if you can help!

In reply to Mod_Perl and Autoloader - anything special I should know? by MashMashy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.