Skip to content
Snippets Groups Projects
Forked from 713 / Warden / Warden - archive
860 commits behind the upstream repository.
chck_modules_version.sh 605 B
#!/bin/bash
#
# Script obtain Perl package version
#
modules=(LWP::Protocol::https)
#modules=(SOAP::Lite SOAP::Transport::TCP File::Pid POSIX DBI Format::Human::Bytes Sys::Syslog File::Basename FindBin Net::CIDR::Lite DateTime)
#modules=(SOAP::Lite SOAP::Transport::TCP File::Pid POSIX DBI DBD::SQLite Format::Human::Bytes Sys::Syslog File::Basename FindBin Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL)

for module in ${modules[@]}
do
	perl -e "eval { require $module; }; if (\$@) { print \"$module: version not found\n\"; } else { print \"$module >= \$$module::VERSION\n\"}"
done

exit 0