Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Finding Module Versions - How Would You Do It?

by Khen1950fx (Canon)
on Feb 13, 2013 at 07:58 UTC ( #1018495=note: print w/ replies, xml ) Need Help??


in reply to Finding Module Versions - How Would You Do It?

I usually end up using this:

#!/usr/bin/perl BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use CPAN; use Term::ANSIColor::Print; my $print = Term::ANSIColor::Print->new(); my @mods = (qw( Scope::Guard Algorithm::C3 Class::C3 Exporter Sub::Install Encode Test Test::More Test::Harness Text::Wrap Pod::Escapes Pod::Simple Pod::Man File::Spec ExtUtils::MakeMaker namespace::clean namespace::autoclean Class::MOP Declare::Constraints::Simple Package::DeprecationManager Sub::Name Try::Tiny Test::Fatal Test::Requires Dist::CheckConflicts Data::OptList Devel::GlobalDestruction List::MoreUtils MRO::Compat Params::Util Scalar::Util Sub::Exporter Task::Weaken Fey Fey::ORM IO::KQueue File::ChangeNotify KiokuDB Moose Moose::Meta::Class MooseX::Aliases MooseX::Attribute::Prototype MooseX::SlurpyConstructor MooseX::Role::WithOverloading MooseX::ClassAttribute MooseX::MethodAttributes MooseX::NonMoose MooseX::POE MooseX::Role::Parameterized MooseX::SemiAffordanceAccessor MooseX::StrictConstructor MooseX::UndefTolerant Package::Stash::XS Package::Stash Eval::Closure Locale::BR DateTime::TimeZone SQL::Translator Set::Object Test::Moose Test::XML::Compare Any::Moose IO::Moose Readonly Readonly::XS)); foreach my $mod(@mods) { my (@matches) = grep(($_ eq $mod), @mods); if(@matches) { foreach $mod( CPAN::Shell->expand("Module", $mod)) { $print->bold_black( "\n\tmodule: ", $mod->id), $print->bold_blue( "\tcurrent version: ", $mod->cpan_version), $print->bold_black( "\tinstalled version: ", $mod->inst_version); } } }


Comment on Re: Finding Module Versions - How Would You Do It?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2015-07-31 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls