[thelist] Blogs

Keith cache at dowebscentral.com
Sat May 11 12:41:01 CDT 2002

At 08:40 AM Saturday 5/11/02, you wrote:
>Hey ya'll ...
>I was attempting to install moveable type on my personal web site, hosted by
>a third-party, running winNT.  I *almost* got it all sorted out and was
>looking forward to using it.  However, it requires a perl module DB_File,
>and my host says they can't (won't?) install it.  :(  I only have FTP access
>to my host, no SSH or telnet.  From the documentation, it says that file has
>to be installed directly on the winNT machine.  Does anyone know anything
>different?  Has anyone been able to get it installed under similar
>circumstances?  All of the other modules required I could FTP, except this
>one.  :(

No problem. The Perl module *does* need to be installed, but it does *not*
need to be installed by the system admin. Perl modules are usually
installed in the Perl library directory, which you probably can't get to,
but they do not NEED to be installed there. You can install it your self
just by FTPing it to the right place.

For example, suppose you wanted to use the Image::Size module:

FTP to the directory where your script is at (the script with the "use" on
it.) If the "use" statement is something like "use Size;" then you would
upload Size.pm to the same directory the script is in. If the "use"
statement is something like "use Image::Size" then you would create a
directory named "Image" inside the directory containing the script and
upload Size.pm to that Image directory. You must install it inside the
script's path, you can't do something like "use ../Size" and install it one
directory level above the script's path.

When Perl compiles a script it looks for the module in what is called the
@INC array. In common usage this refers to an array of modules in the Perl
module library. But, the @INC array automatically also includes the
directory contents, and tree contents, of the path that the script is on.
Actually, for historical reasons, the Interpreter looks for modules in the
script's path first because that is the @INC path for the script, and if it
doesn't find it there it then goes to the Interpreter's @INC path, the
library path.

All you have to do is upload the module file (and if you were on Unix give
it permission to be read by the Interpreter). There is no actual "install"
for a module that resides in the script's path, just disregard all of the
"make" instructions that may come with the module, they only apply if you
are installing from the commandline into the Interpreter's library path.

If you do not have the module you can get it at CPAN: http://search.cpan.org/


cache at dowebscentral.com

More information about the thelist mailing list