Both the BEGIN/unshift and 'use lib' techniques expect a single
directory, not colon separated directories.

BEGIN {
    unshift @INC,
        '/home/taylorp/perlmodules',
        '/home/taylorp/perlmodules/i386-linux';
}

OR

use lib '/home/taylorp/perlmodules';
use lib '/home/taylorp/perlmodules/i386-linux';

(Actually, the first use lib statement will automatically include the
second directory (and more) provided that the structure under perlmodules
is similiar with the standard library directory structure).

The -I was designed to work in Unix sense, like PATH and MANPATH for
example, you define one or more directories separeted by colon.


hth
-- 
san->http(www.trabas.com)

On Sun, 27 Jan 2002, Phil Taylor <[EMAIL PROTECTED]> wrote,

> I have recently tried the folloiwng to load HTML::Template
> 
> BEGIN {unshift @INC,"/home/taylorp/perlmodules:/home/taylorp/perlmodules/i386-linux"}
> AND 
> use lib "/home/taylorp/perlmodules:/home/taylorp/perlmodules/i386-linux";
> 
> but neither have worked, I finally resorted to the -I flag
> 
> ie
> #!/usr/bin/perl   -I /home/taylorp/perlmodules:/home/taylorp/perlmodules/i386-linux
> 
> 
> which does work. Any ideas why?
> 
> Phil
> ----- Original Message ----- 
> From: "Sam Tregar" <[EMAIL PROTECTED]>
> To: "Philip S Tellis" <[EMAIL PROTECTED]>
> Cc: "HTML::Template List" <[EMAIL PROTECTED]>
> Sent: 26 January 2002 18:58
> Subject: Re: [htmltmpl] how to force the new version ?
> 
> 
> > On Sun, 27 Jan 2002, Philip S Tellis wrote:
> > 
> > > Sometime on Jan 26, Nishikant Kapoor assembled some asciibets to say:
> > >
> > > > push (@INC, "/home/nkapoor/www/cgi-bin");
> > >
> > > this puts your directory at the end of @INC.  You want it at the
> > > beginning.  Use unshift instead.
> > 
> > But rememeber, it has to be in a BEGIN block.  Both of these will work:
> > 
> >   BEGIN { unshift @INC, "/my/lib" }
> > 
> > And
> > 
> >   use lib "/my/lib";
> > 
> > Since the have effect at compile-time and do that same thing.  To use
> > HTML::Template from a setup like that you'll have to then have the file:
> > 
> >   /my/lib/HTML/Template.pm
> > 
> > If you just try:
> > 
> >   /my/lib/Template.pm
> > 
> > It won't get loaded for HTML::Template.
> > 
> > -sam
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 



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

Reply via email to