This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Perl CPAN module help


Doug VanLeuven <roamdad@sonic.net> wrote:
>
>#!/usr/bin/perl
>
>use CPAN;
># list all modules on my disk and note the newer versions
>for $mod (CPAN::Shell->expand("Module","/./")){
>         next unless $mod->inst_file;
>                 # here only when installed
>         if ($mod->inst_version eq "undef") {
>                 printf "%s :No VERSION\n", $mod->id;
>         }
>         elsif ($mod->uptodate){
>                 printf "%s %s\n", $mod->id, $mod->inst_version
>         }
>         else {
>                 # here when not up to date
>         printf "%s %s, NEW VERSION=%s\n",
>                 $mod->id, $mod->inst_version, $mod->cpan_version;
>         }

That will miss all modules that don't exist on CPAN.

Peter

-- 
Peter J. Acklam - pjacklam@online.no - http://home.online.no/~pjacklam


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]