Skip to content

Instantly share code, notes, and snippets.

@komalsrathi
Created December 30, 2015 18:37
Show Gist options
  • Save komalsrathi/9073be2af6100a47a15e to your computer and use it in GitHub Desktop.
Save komalsrathi/9073be2af6100a47a15e to your computer and use it in GitHub Desktop.
Get version of Perl module
#!/bin/bash
# usage bash get_module_version.sh MODULENAME
# module name as first argument
mod=$1
# get version
perl -M$mod -e "print \"$mod: \$$mod::VERSION\n\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment