Skip to content

Instantly share code, notes, and snippets.

@sergeyromanov
Created November 29, 2011 07:04
Show Gist options
  • Save sergeyromanov/1403806 to your computer and use it in GitHub Desktop.
Save sergeyromanov/1403806 to your computer and use it in GitHub Desktop.
Get a version of Perl module
#!/bin/sh
mod=$1
if test "x$mod" = "x"; then
echo "Usage: $0 <module>"
exit
fi
if test "x$PERL" = "x"; then
PERL=perl
fi
$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