Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday May 20, 2009
03:51 AM

Module Version Vim Binding

[ #39007 ]

Like most Perl programmers I know, I have a tiny command line utility which prints out a module version:

#!/usr/bin/env perl
my $module = shift;

package OVID::PVERSION; # for modules which won't let you use 'em in %main::
eval "use $module";
die $@ if $@;
print $module->VERSION || "Could not determine a version for $module", $/;


=head1 NAME



pversion Some::Module


Prints out the Perl version number of an installed module.


Today, while trying to figure out a versioning issue in vim, I added the ,pv mapping. If you're on a module name and type that, it automatically displays the version number.

noremap  ,pv  :!echo <cword> version `$HOME/bin/pversion '<cword>'`<cr>

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.