Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

HTML::Template

by Anonymous Monk
on Sep 13, 2001 at 19:05 UTC ( #112206=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to use this module on my site, but my web host won't install this module how do I install it locally so I have access to HTML::Template???

Comment on HTML::Template
Re: HTML::Template
by George_Sherston (Vicar) on Sep 13, 2001 at 19:12 UTC
    Get a copy from CPAN, then save it in a directory you do have access to and put
    BEGIN {unshift @INC, 'path'}
    at the start of your script, where "path" is the filepath from where your script is to the directory where you installed the module. @INC contains tells perl where to look for modules that you use, so after you've done that you should be able to call the module the same way you call pre-installed modules.

    Hope that works for you the way it works for me!

    George Sherston
        Yes, and as princepawn /msg'd me, it also gives access to modules in sub paths, so all round a better answer. Just goes to show, new lessons to be had everywhere :)

        George Sherston
Re: HTML::Template
by MZSanford (Curate) on Sep 13, 2001 at 19:13 UTC
    you could install the module into a directory under your home directory, and then add a use lib '/home/dir/lib'; line to each script. To install the module in a special place can usually be done with the following (if i recall):
    perl Makefile.PL PREFIX=/home/dir/lib make make test make install

    my own worst enemy
    -- MZSanford
Re: HTML::Template
by Zaxo (Archbishop) on Sep 13, 2001 at 19:15 UTC

    You can install any modules you need in your home directory. You should read the CPAN.pm docs to see how to set up the build environment. That done, say use lib 'wherever'; to include that location in the search path.

    After Compline,
    Zaxo

Re: HTML::Template
by Graham (Deacon) on Sep 13, 2001 at 19:17 UTC
    Firstly, I assume you have some form of shell account on this host so you can install locally.

    perlfaq8 has the answer under How do I keep my own module/library directory?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-08-20 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (110 votes), past polls