To check the version number of an installed Perl module from the command line, use the following one-liner template:
Bash
perl -M<Module> -e 'print "<Module>::VERSION\n"'
Examples
- Check the version of the
CGImodule:Bashperl -MCGI -e 'print "$CGI::VERSION\n"' - Check the version of
Data::Dumper:Bashperl -MData::Dumper -e 'print "$Data::Dumper::VERSION\n"'
Alternative Methods
- Using CPAN:Bash
cpan -m CGI - Using Corelist (for core modules):Bash
corelist CGI
No comments:
Post a Comment