Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created April 3, 2010 15:31
Show Gist options
  • Save xaicron/354586 to your computer and use it in GitHub Desktop.
Save xaicron/354586 to your computer and use it in GitHub Desktop.
function pm-version {
local arg;
local module_path;
for arg in $@; do
module_path=`perldoc -l $arg 2>&1`;
if [ ! -e "$module_path" ]; then
echo "$arg not found"
break
fi
perl -MExtUtils::MakeMaker -e '
$module = shift;
$path = shift;
printf "%s : %s\n", $module, MM->parse_version($path);
' "$arg" "$module_path"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment