Skip to main content.
home | support | download

Back to List Archive

Re: How to install Spreadsheet::ParseExcel and HTML::Entities

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Jan 21 2004 - 16:39:51 GMT
On Wed, Jan 21, 2004 at 03:07:00AM -0800, Marko Faldix wrote:
> Hello,
> 
> Maybe nice to have if excel files could indexed, too.
> 
> swish-e version: 2.4.1
> perl v5.6.1
> win2k
> 
> I have got a simple question as non Perl programmer and still no answer
> found in documentation and discussion:
> 
> If I search for Spreadsheet::ParseExcel  and HTML::Entities at
> http://search.cpan.org
> I got source files ParseExcel.pm and Entities.pm but no installing
> instruction.

It mostly depends on your platform, and also if the module is pure-perl 
or contains C extensions.

In the general case, what you do is fetch the package, unpack and 
install it:

   $ wget http://search.cpan.org/CPAN/authors/id/K/KW/KWITKNR/Spreadsheet-ParseExcel-0.2602.tar.gz
   $ tar zxof Spreadsheet-ParseExcel-0.2602.tar.gz
   $ cd Spreadsheet-ParseExcel-0.2602
   $ perl Makefile.PL
   $ make test
   $ su root
   # make install

That should work on Windows for modules that do not contain any .xs 
files -- assuming you have wget (if not use IE to download) and tar 
(maybe winzip would work, but it's better to just install the standard 
unix tool on Windows).

For Perl modules that have C parts (.xs files) then you need a C 
compiler that is compatible with the version of Perl you have installed.  
That's standard on Unix, but under Windows it's less likely.

So, ActiveState has is PPM repository.  It contains many of the CPAN 
modules pre-packaged for easy installation.

  http://ppm.activestate.com/

I don't know how to actually install the packages, but I'm sure it's as 
easy as 

  ppm install Spreadsheet-ParseExcel

Sometimes the hard part it figuring out the name used for the module.

On Debian, for example you do:

  # apt-get install libspreadsheet-parseexcel-perl


> Where do I have to put them (on Windows)? I tried different directories. Is
> it true that Filter.pm finds them automatically if they are placed in
> appropriate place?

Perl uses its @INC array to find packages, so they get installed there.  
The paths in @INC are prefixes to the package name.

   foreach my $prefix ( @INC ) {
       $path = "$prefix/Spreadsheet/ParseExcel.pm";
   }

although if there's binary parts it's a bit more complex.  But you don't 
need to worry about that stuff.


-- 
Bill Moseley
moseley@hank.org
Received on Wed Jan 21 16:42:17 2004