http://www.perlmonks.org?node_id=382542

GaijinPunch has asked for the wisdom of the Perl Monks concerning the following question:

Yeah, it's a damn shame, but getting my provider to sort out this module is likely not going to happen.

My site layout has a top, left column, right column, and center area. I've got several scripts though, depending on what content you user is viewing. I would obviously want do each of the four parts seperately, as to not have to update 8-10 scripts every time there's a change. I'm at a loss. Please teach me.
  • Comment on Options for SS Includes when HTML::Template is unavailable

Replies are listed 'Best First'.
Re: Options for SS Includes when HTML::Template is unavailable
by BUU (Prior) on Aug 13, 2004 at 04:32 UTC
    You can install modules without having root. You can install pure perl modules, of which HTML::Template is, without even needing a shell. Simply ftp the .pm file to a folder named HTTP, and include it.
      I didn't know that. THanks for the tip. EDIT: No love. I've put Template.pm in HTTP/Template.pm (relatively to where the script is run) and it still whines that it can't find HTML/Template within @INC (which is an array of all types of directories I don't have access to.) I even put it in HTML/Template just for good measure.
        Add
        use lib '/path/to/where/your/modules/live';
        before your use HTML::Template;
Re: Options for SS Includes when HTML::Template is unavailable
by saintmike (Vicar) on Aug 13, 2004 at 06:23 UTC
    In order to install modules when you're not root, use
    perl Makefile.PL LIB=/home/me/perl_modules
    when installing them into /home/me/perl_modules and use
    use lib '/home/me/perl_modules'; use FreshlyInstalledModule;
    in your code to use them.
      And if I don't have a shell?
        HTML::Template seems to be pure-purl, and just needs the one .pm, so:
        • create a dir in your home called lib (for example)
        • create a dir named HTML in lib/ (so now we have lib/HTML)
        • copy a recent Template.pm into the new dir
        • add a use lib '/myhome/lib' in your script
        And you should be all set...

        Am I to assume your scripts are all cgi's? If you expect a lot of traffic on your scripts, you may be able to persuade your provider/administrator to activate mod_perl to alleviate the server load...

Re: Options for SS Includes when HTML::Template is unavailable
by wfsp (Abbot) on Aug 13, 2004 at 08:56 UTC
    There was a very good discussion on relative module paths here. I liked Anneq's approach in particular.

    update: fixed link (eventually)