> -----Original Message-----
> From: Roland Praehofer [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 03, 2001 9:12 AM
> To: [EMAIL PROTECTED]
> Subject: Using different versions of a module
> 
> 
> Hi,
> 
> I'd like to use a newer version of the GD module
> Is it possible to have two versions of it on the same machine, 
> as the System Admin is not willing to update ?
> 
> I've installed it into my home directory but now, if I try to use it
> in my programs I get errors like:
> 
> GD object version 1.19 does not match $GD::VERSION 1.33 at 
> /usr/lib/perl5/5.0050 3/i586-linux/DynaLoader.pm line 188.
> 
> How do I tell Perl to use the newer version ?

Add a use lib statement to your script:

   use lib '/my/home/dir';

Or, set environment variable PERL5LIB:

   $ PERL5LIB=/my/home/dir
   $ export PERL5LIB

Either of these will cause Perl to search the given directory for modules
before
searching the standard locations.

If for some reason you only want to load GD from this location, but not
anything
else, you can do something like this in your script:

   BEGIN {
      require "/my/home/dir/GD.pm";
      import GD;
   }

Probably you will want to use the PERL5LIB option. Then, if the standard
libraries
are updated later, you can just remove the one in your home dir and not have
to
change any scripts.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to