Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install script distributions from CPAN?

Tags:

perl

cpan

I tried:

cpan> i /xls2csv/
No objects found of any type for argument /xls2csv/

cpan> install xls2csv
Warning: Cannot install xls2csv, don't know what it is.
Try the command

i /xls2csv/

to find objects with matching identifiers.

I haven't had any problems installing registered modules, e.g.

cpan> install DateTime

It is just the xls2csv that is providing problems.

Thank you for any insights provided.

P.S. Constrained To Windows with ActivePerl 5.10 (I think) Also I have the xls2csv-1.06.tar.gz file downloaded and tried cpan> install C:/...path to file locally/xls2csv-1.06.tar.gz

That did not seem to work, and I must install locally.

like image 661
JustADude Avatar asked Jun 14 '09 05:06

JustADude


People also ask

How do I download Perl modules from CPAN?

To install Perl modules using CPAN, you need to use the cpan command-line utility. You can either run cpan with arguments from the command-line interface, for example, to install a module (e.g Geo::IP) use the -i flag as shown.

Where does CPAN install to?

CPAN doesn't actually install files. It runs the install script embedded in each distribution, which then performs the actual install. For distributions using ExtUtils::MakeMaker, the defaults are documented here: https://metacpan.org/pod/ExtUtils::MakeMaker#make-install (and the default value of INSTALLDIRS is site ).


1 Answers

The indexes used by CPAN.pm are all module-oriented, so they don't see distributions that contain no modules. (xls2csv has only a script.) You can still install them by giving the full path (under authors/id) of the distribution, just as you would to install older or development versions of a distribution:

cpan> install K/KE/KEN/xls2csv-1.06.tar.gz
like image 89
ysth Avatar answered Sep 19 '22 18:09

ysth