Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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); } } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018495]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-04-25 22:49 GMT
Find Nodes?
    Voting Booth?