#!/usr/bin/env perl

if (@ARGV != 2) { die "USAGE: ckmodule.pl (module) (version)\n"; }

$x = eval "require $ARGV[0]; 1";
if (! $x) { 
    exit 1;
}

# print "\$$ARGV[0]::VERSION\n";

$version = eval "\$$ARGV[0]::VERSION";
print "$ARGV[0]: $version\n";

if ($ARGV[1] > $version) {
    print "$ARGV[0] is too old: have $version : need $ARGV[1]\n";
    exit 1;
}

exit 0;
