Check installed version of a perl module
Add the function to your bash-profile (it's one line starting with perl):
function perlver {
lib=${1//::/\/}
perl -e "use $1; printf(\"%s\n\tPath: %s\n\tVersion: %s\n\", '$1', \$INC{'$lib.pm'}, \$$1::VERSION);" 2>/dev/null || echo "$1 is not installed"
}
And run (for any module, e.g. List::Util)
perlver List::Util
Written by Karsten Silkenbäumer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
janosgyerik
25.11K
Jean-Remy Duboc
12.22K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#