To find out where cpan has installed GD, use the "m" command and look for the "INST_FILE" item. This is the path where the module is installed. On my system, it looks as follows:
cpan[8]> m GD Module id = GD DESCRIPTION Interface to Gd Graphics Library CPAN_USERID LDS (Lincoln D. Stein <lstein@cshl.edu>) CPAN_VERSION 2.41 CPAN_FILE L/LD/LDS/GD-2.41.tar.gz UPLOAD_DATE 2008-08-07 DSLIP_STATUS MdcOp (mature,developer,C,object-oriented,Standard-Pe +rl) MANPAGE GD.pm - Interface to Gd Graphics Library INST_FILE /usr/local/lib/perl5/site_perl/5.10.0/i686-linux/GD.p +m INST_VERSION 2.41
As cpan sees that the module is installed but your script can't load it, it must be that cpan and your script are looking in different places. Your script will look in every folder listed in @INC, the contents of which are displayed in the error message you have posted.
This can happen if you have two different instances of perl on your system. You may run one when you run cpan (which is a perl script) and a different one when you run your script producing the error.
In reply to Re: Can't locate GD.pm in @INC
by ig
in thread Can't locate GD.pm in @INC
by mowax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |