Operating System - Linux
1751765 Members
4514 Online
108781 Solutions
New Discussion юеВ

Some perl module help required

 
SOLVED
Go to solution
Tony Walker_2
Frequent Advisor

Some perl module help required

Hi Guys,

I have two boxes - both with the same version of perl (4.0.1.8). A user who is currently using a ParseExcel which he wants available on the other machine. I've found the directory on the current machine and have copied it across to the other. I've also included the OLE::Storage_Lite directory as this is a requirement. On the other machine, when I run the first part of the install (perl MakeFile.pl) I get the following error:

#perl Makefile.PL
syntax error in file Makefile.PL at line 1, next 2 tokens "use ExtUtils"
Execution of Makefile.PL aborted due to compilation errors.

This also happens on the original machine? Any help much appreciated.

Thanks,

Tony
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: Some perl module help required

Hi TOny:

Perl 4?!? You *really* need to upgrade to a current version.

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL

Regards!

...JRF...
Tony Walker_2
Frequent Advisor

Re: Some perl module help required

Of course in an ideal world that would be my first port of call but alas I just need to fix the immediate problem.

Thanks
Sameer_Nirmal
Honored Contributor

Re: Some perl module help required

Hi,

As indicated in the error message, a module needs to be added with "ExtUtils".

Depending on the requirement, one has to download the required modules which are not delivered in the statandard HP-UX perl version. One can download them from
http://www.cpan.org

Have you used these modules as
use ExtUtils::MakeMaker;
use Spreadsheet::ParseExcel;
H.Merijn Brand (procura
Honored Contributor

Re: Some perl module help required

The ideal world is a nice place. Unfortunately you do not live in an ideal world.

perl4 is old, as already noted by others. Usually `old' is a relative word, and you can get away with it, but in this case you can't. perl4 does not support dynamic loading and/or modules as we know them in perl5, so you will not be able to use either OLE::Storage, or ParseExcel in perl4, how hard you try. It is a different architecture.

If you install binary perl distributions from my site, they include both these modules already.

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tony Walker_2
Frequent Advisor

Re: Some perl module help required

All,

My apologies - I've checked their script and they are indeed not using the default perl install but v5.6.1 instead!
Does that help?
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Some perl module help required

Yes. 5.6.1 should help. That should work.

Be sure *YOU* have perl5.6.1 in you $PATH *before* /usr/contrib/bin, which is perl4 default location

FWIW the ParseExcel (.xls) files are architecture and perl version independant and can be read everywhere.

# perl Makefile.PL
# make
# make test
# make install

or, if you have used CPAN before

# perl -MCPAN -e'install Spreadsheet::ParseExcel'

that should auto-resolve the dependancies.

If you ask me, ParseExcel is a *great* (yes, realy great) module, but the interface is far from easy. I have tried to simplify that in my module Spreadsheet::Read, which uses Spreadsheet::ParseExcel in the background. (and supports CSV and OpenOffice documents too if you installed Text::CSV_XS and/or Spreadsheet::ReadSXC)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tony Walker_2
Frequent Advisor

Re: Some perl module help required

Thanks procura.

I got to the make test section which failed to see IO:Scalar in one of its arrays @INC? I went for your MCPAN option and it seems to have done the trick - the only difference being that its installed the module in the default /opt location as opposed to the user space (to be expected I suppose).

I'll await the users reponse but it sounds fixed to me!

Thanks
Tony Walker_2
Frequent Advisor

Re: Some perl module help required

In fact, is there a test I can do to make sure that the module can be loaded into a script successfully (apart from just doing a Use)?

Cheers
H.Merijn Brand (procura
Honored Contributor

Re: Some perl module help required

No, there is no other way, as 'use' actually calls the import method of the module.

# perl -MOLE::Storage_Lite -le'print $OLE::Storage_Lite::VERSION'
0.14
#

Don't forget about the points.

Enjoy, Have FUN ! H.Merijn
Enjoy, Have FUN! H.Merijn