Reputation: 5652
Can't locate Spreadsheet/ParseExcel.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .)
though it's installed:
% perl -e'use CPAN; install "Spreadsheet:WriteExcel"'
Going to read '/home/aspect_mkn8rd/.cpan/Metadata'
Database was generated on Sun, 27 Apr 2014 09:41:02 GMT
Spreadsheet::WriteExcel is up to date (2.40).
That's where it located, yep?
% ls -la /usr/local/lib/perl/5.14.2/auto/Spreadsheet/WriteExcel
total 12
drwxrwxr-x 2 root root 4096 апр. 28 13:11 .
drwxrwxr-x 3 root root 4096 апр. 28 13:11 ..
-rw-rw-r-- 1 root root 2519 апр. 28 13:11 .packlist
% cat /usr/local/lib/perl/5.14.2/auto/Spreadsheet/WriteExcel/.packlist
/usr/local/bin/chartex
/usr/local/man/man1/chartex.1p
/usr/local/man/man3/Spreadsheet::WriteExcel.3pm
/usr/local/man/man3/Spreadsheet::WriteExcel::BIFFwriter.3pm
<..>
/usr/local/man/man3/Spreadsheet::WriteExcel::Workbook.3pm
/usr/local/man/man3/Spreadsheet::WriteExcel::Worksheet.3pm
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel.pm
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel/BIFFwriter.pm
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel/Big.pm
<..>
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel/Workbook.pm
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel/Worksheet.pm
% perldoc -l Spreadsheet::WriteExcel
/usr/local/share/perl/5.14.2/Spreadsheet/WriteExcel.pm
So why? What should I do?
Upvotes: 5
Views: 18458
Reputation: 592
There are 2 ways to go about the same:
use lib '/path/to/directory'
where the module is stored
perl -I /path/to/directory test.pl
where you include the module using the command line option -I
For more information, please refer to https://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations .
Voilá, here you go, happy coding
Upvotes: -1
Reputation: 35198
Spreadsheet::ParseExcel
and Spreadsheet::WriteExcel
are different modules.
Have you installed the former too?
If not, just do the following:
perl -e'use CPAN; install "Spreadsheet::ParseExcel"'
Upvotes: 12