X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_YG
X-Spam-Check-By: sourceware.org
Message-ID: <4CB99E49.8070009@x-ray.at>
Date: Sat, 16 Oct 2010 14:44:57 +0200
From: Reini Urban <rurban@x-ray.at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Perl Modules?
References: <4CB8AC14.9020604@veritech.com> <AANLkTin=CojGWy_R7nfLPnjJMAoO_hRW8f5RvfHQ3qfP@mail.gmail.com>
In-Reply-To: <AANLkTin=CojGWy_R7nfLPnjJMAoO_hRW8f5RvfHQ3qfP@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

