Perl Modules?

Reini Urban rurban@x-ray.at
Sat Oct 16 12:46:00 GMT 2010


Csaba Raduly schrieb:
> On Fri, Oct 15, 2010 at 9:31 PM, Lee D. Rothstein  wrote:
>>   * What are the standard paths for Perl Modules on Cygwin?
>>
>>> Is there a command, environment variable, Perl internal
>>     variable, or Perl function that will tell me this?
>
> Perl -V will list the default @INC:
>      /usr/lib/perl5/5.10/i686-cygwin
>      /usr/lib/perl5/5.10
>      /usr/lib/perl5/site_perl/5.10/i686-cygwin
>      /usr/lib/perl5/site_perl/5.10
>      /usr/lib/perl5/vendor_perl/5.10/i686-cygwin
>      /usr/lib/perl5/vendor_perl/5.10
>      /usr/lib/perl5/vendor_perl/5.10
>      /usr/lib/perl5/site_perl/5.8
>      /usr/lib/perl5/vendor_perl/5.8

If you installed perl modules by yourself via cpan, they are either in
/usr/lib/perl5/site_perl/5.10/i686-cygwin (platform specific, with XS 
code) or
/usr/lib/perl5/site_perl/5.10/ (without)

If you install perl modules via setup.exe they are in
/usr/lib/perl5/vendor_perl/5.10/i686-cygwin resp. 
/usr/lib/perl5/vendor_perl/5.10/

>> * What are the standard modules installed with Perl?
>>> Is there a command, environment variable, Perl internal
>>     variable, or Perl function that will tell me this?
>
> cygcheck -l perl
>
> will list all the files in the Cygwin package. This list is rather exhaustive.

See also the announcement email
   http://sourceware.org/ml/cygwin-announce/2010-09/msg00026.html

There the command
$ perl -MExtUtils::Installed \
 >   -e'print join("\n", new ExtUtils::Installed->modules)' > module.list
is explained.
See also /usr/bin/instmodsh - A shell to examine installed modules (I 
dislike this little helper)

perl comes with the core modules (in ext, dist, cpan and lib)
plus some vendor modules to enable cpan, so that you can install and 
test further modules by yourself.

This lists all original core modules for 5.10.1:
$ perl -MModule::CoreList \
-e'print join " ", keys %{$Module::CoreList::version{5.010001}}'

The additional cygwin vendor modules in perl are listed in
http://code.google.com/p/cygwin-rurban/source/browse/trunk/release/perl/modules

>> * Is there a way to query which Perl modules are installed?
>>> On cygwin, or off?
>
> perldoc perllocal (which uses
> /usr/lib/perl5/5.10/i686-cygwin/perllocal.pod) lists some modules.

See above. Plus
$ perl -MWhich::Module -e0
returns an error if Which::Module is not installed.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list