Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Options for SS Includes when HTML::Template is unavailable

by GaijinPunch (Pilgrim)
on Aug 13, 2004 at 00:24 UTC ( #382542=perlquestion: print w/replies, xml ) Need Help??
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 00: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 in HTTP/ (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.
        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 02: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 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 04:56 UTC
    There was a very good discussion on relative module paths here. I liked Anneq's approach in particular.

    update: fixed link (eventually)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://382542]
Approved by Aristotle
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2018-11-15 18:39 GMT
Find Nodes?
    Voting Booth?
    My code is most likely broken because:

    Results (191 votes). Check out past polls.

    • (Sep 10, 2018 at 18:53 UTC) Welcome new users!