#!/usr/bin/env perl

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

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

$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;
