Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Perl Monk, Perl Meditation
 
PerlMonks  

How to install DBI in my own directory?

by Anonymous Monk
on Sep 25, 2000 at 21:15 UTC ( #33932=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need to install the DBI module in my own directory on my service provider's server.

Comment on How to install DBI in my own directory?
Re: How to install DBI in my own directory?
by merlyn (Sage) on Sep 25, 2000 at 23:21 UTC
    Read perlmodinstall. If that's not clear, ask again about what part of that you don't understand.
Re: How to install DBI in my own directory?
by jreades (Friar) on Sep 26, 2000 at 18:00 UTC

    Summary of perldoc:

    tar -xzvf your_module.tar.gz # one-step decompression cd your_module_dir perl Makefile.PL make make test make install # assuming tests are successful

    I suspect, however, that the last stage isn't going to work for you, as I believe you need to be root on the machine to run make install (this would also make DBI available to everyone on that machine.

    You may find that you need to load DBI manually into each application you write using either:

    use DBI;
    or
    require DBI;

    You'd probably want to try testing things out using a require (which, as I recall, would allow you to roll a custom importation script for debugging) and then, once you know everything is running correctly, switching over to use (which will import the DBI module at compile time).

      Comments:
      • You dont need root access to install DBI in your own directories though you may get warnings if the install tries to add the docs to the Perl doc tree.
      • perl Makefile.PL Prefix=/pathtoyourdir/ should get round that
      • I dont see what use followed by require will give you (though that could be me missing something)

        Sorry, I meant that as an either/or case, not both in one script.

        My point was that using require you can run a series of tests (see Camel Book pg. 205) allowing you to determine points of failure in the import routine more specifically that via a use.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-04-21 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls