Home: Perl Programming Help: Beginner:
@INC/library



mjp
New User

May 4, 2011, 9:26 AM


Views: 1332
@INC/library

Complete newbie, a few home-made simple scripts before with an earlier Perl. I now have Active State 5.12.3 on Win XP SP3 and am trying to use a module (for the first time) for an Excel function.

Installed Spreadsheet::ParseExcel via PPM, but when I run the example 'a_simple_parser.pl' from Spreadsheet-ParseExcel-0.59\examples' I get 'cannot locate Spreadsheet/ParseExcel.pm in @INC' etc etc

I have checked @INC and it contains C:/usr/site/lib and C:/usr/lib and the .pm is in the former location. PPM shows 'no missing packages to install'. I have also used 'Use lib etc etc' with no success.

Bit Stuck! Be gentle!


miller
User

May 4, 2011, 12:27 PM


Views: 1327
Re: [mjp] @INC/library

Try restarting your command prompt so that paths are updated if this is a new install.

I wish I could quickly suggest a solution for your problem, but my main thought is that I'd recommend that you use Strawberry Perl instead of ActivePerl on windows. The fact that strawberry perl uses cpan instead of the ppm is a major selling point for me, although I have used ActiveState in the past.

To install packages on Strawberry perl, just do the following:


Code
cpan -i Spreadsheet::ParseExcel


- Miller


(This post was edited by miller on May 4, 2011, 12:29 PM)


mjp
New User

May 4, 2011, 12:50 PM


Views: 1324
Re: [miller] @INC/library

Thanks, Miller - several reboots have passed and the problem still lives. As I said @INC appears correct and the pm is in the right place. I have Googled myself blind looking for answers.


miller
User

May 4, 2011, 2:00 PM


Views: 1318
Re: [mjp] @INC/library

Trying installing and testing with a more basic module like List::MoreUtils or File::Slurp.

Spreadsheet::ParseExcel has a lot of dependencies and so might not have installed correctly. If you can get the other ones to work, then you'll at least have isolated your installation procedure with ppm.

- Miller