> At Mon, 13 May 2002 18:30:10 +1000, Tony  wrote:
> > I am trying to run a perl program which has in it
> >
> > use HTML::Entities ();
> >
> > [tony@ringo FetchYahoo]$ ./fetchyahoo.pl --help
> > Can't locate HTML/Entities.pm in @INC (@INC contains:
> > /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1
> > /usr/lib/perl5/site_perl/5.6.1/i386-linux
> /usr/lib/perl5/site_perl/5.6.1
> > /usr/lib/perl5/site_perl/5.6.0/i386-linux
> /usr/lib/perl5/site_perl/5.6.0
> > /usr/lib/perl5/site_perl .) at ./fetchyahoo.pl line 40.
> > BEGIN failed--compilation aborted at ./fetchyahoo.pl line 40.
> >
> > [root@ringo rpms]# ls -l
> >
> /usr/lib/perl5/vendor_perl/5.6.1/i386-linux/HTML/Entities.pm
>  -r--r--r--
> > +1 root     root        11359 Nov  6  2001
> > +/usr/lib/perl5/vendor_perl/5.6.1/i386-linux/HTML/Entities.pm
> > [root@ringo rpms]#
> >
> > Question:  How do I tell the perl program I want to run where
> > HTML::Entities is?
>
> one of either:
>
>  perl -I/usr/lib/perl5/vendor_perl/5.6.1/i386-linux
> fetchyahoo.pl --help
>
>  export PERL5LIB=/usr/lib/perl5/vendor_perl/5.6.1/i386-linux
>  ./fetchyahoo.pl --help
>
>  near the beginning of fetchyahoo.pl, add:
>   use lib '/usr/lib/perl5/vendor_perl/5.6.1';
>  (note this is smart enough to find the i386-linux subdirectory)


or near the beginning of fetchyahoo.pl
add

push (@INC, '/usr/lib/perl5/vendor_perl/5.6.1/i386-linux');
@INC is like the PATH that perl searches thru for modules.

have you tried CPAN.pm to get HTML::Entitites ?  (it will put it in
the correct location)

perl -e shell -MCPAN

<< run thru the install >>

when you get to the

cpan>

run

cpan> install HTML::Entities

see you CPAN Dealer for more included options (www.cpan.org)



-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to