In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Kevin Zembower) wrote:

> I have a program that requires Mail::Mailer.pm. When I try to run it, I
> get:
> www:/usr/local/httpd/cgi-bin # ./mail2friend.pl 
> Can't locate Mail/Mailer.pm in @INC (@INC contains:
> /usr/lib/perl5/5.6.0/i586-linux /usr/lib/perl5/5.6.0
> /usr/lib/perl5/site_perl/5.6.0/i586-linux /usr/lib/perl5/site_perl/5.6.0
> /usr/lib/perl5/site_perl .) at ./mail2friend.pl line 45.
> BEGIN failed--compilation aborted at ./mail2friend.pl line 45.
> 
> However:
> www:/usr/local/httpd/cgi-bin # find / -name Mailer.pm
> /root/.cpan/build/MailTools-1.41/Mail/Mailer.pm
> /root/.cpan/build/MailTools-1.41/blib/lib/Mail/Mailer.pm
> /usr/local/lib/perl5/site_perl/5.6.1/Mail/Mailer.pm
> 
> So, it seems to me that what's happening is that CPAN installed
> Mail::Maker in a directory that's not being searched in the @INC array.
> 
> When I try to install it using CPAN, I get:
> www:/usr/local/httpd/cgi-bin # perl -MCPAN -e "install Mail::Mailer"
> ...
> Mail::Mailer is up to date.
> 
> This also happens if I force install. Previously, I had entered "o conf
> make_install_arg UNINST=1" so I believe that this should uninstall the
> module, then reinstall it. [Tangent: How do I check to make sure this
> variable is still correctly set?]
> 
> 
> My questions:
>   How do I control which directory CPAN installs a module in? Is it a
> good idea to force this?
> Or:
>    How do I change the directories in @INC? Is it a good idea to force
> this?
> 
> Thanks in advance for your help.
> 
> -Kevin Zembower

it installed it in your /usr/local directory.

/usr/local/lib/perl5/site_perl/5.6.1/Mail/Mailer.pm

simply add the line 

    use lib '/usr/local/lib/perl5/site_perl/'; # usually

but in this case you may have to add the 

    use lib '/usr/local/lib/perl5/site_perl/5.6.1/';

typically one tells the cpan shell to use ~/perl/ for the individual 
users stuff, but you can reconfigure CPAN to install it where you want. 

check the options under 

perl -MCPAN -e shell
and enter a '?' at the cpan> prompt for help, and 'o conf' to see the 
config options for CPAN's shell.

print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d";
-- 
Scott R. Godin            | e-mail : [EMAIL PROTECTED]
Laughing Dragon Services  |    web : http://www.webdragon.net/
It is not necessary to cc: me via e-mail unless you mean to speak off-group.
I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-)

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

Reply via email to