IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 19, 2007, 4:39:21 PM (19 years ago)
Author:
eugene
Message:

adding test for perl module version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/ckmodule.pl

    r11953 r12508  
    11#!/usr/bin/env perl
    22
    3 if (@ARGV != 1) { die "USAGE: ckmodule.pl\n"; }
     3if (@ARGV != 2) { die "USAGE: ckmodule.pl (module) (version)\n"; }
    44
    55$x = eval "require $ARGV[0]; 1";
    6 if ($x) {
    7     exit 0;
    8 } else {
     6if (! $x) {
    97    exit 1;
    108}
    119
     10# print "\$$ARGV[0]::VERSION\n";
     11
     12$version = eval "\$$ARGV[0]::VERSION";
     13print "$ARGV[0]: $version\n";
     14
     15if ($ARGV[1] > $version) {
     16    print "$ARGV[0] is too old: have $version : need $ARGV[1]\n";
     17    exit 1;
     18}
     19
     20exit 0;
Note: See TracChangeset for help on using the changeset viewer.