Browse Source

Added CLI using Getopt::Long

Alois Mahdal 12 years ago
parent
commit
50f823f011
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      bin/autotest.pl

+ 8
- 0
bin/autotest.pl View File

@@ -20,6 +20,7 @@
20 20
 use v5.10;
21 21
 use warnings;
22 22
 use File::Spec;
23
+use Getopt::Long;
23 24
 
24 25
 my $PLATFORM    = (-d "c:\\windows" ? 'windows' : 'unix' );
25 26
 my $DELAY       = 5;
@@ -28,6 +29,13 @@ my $DUMPS       = "dumps";
28 29
 my $REPEAT      = 1;
29 30
 my $TESTS       = "t";
30 31
 
32
+my $opts = GetOptions(
33
+    "delay=i"   => \$DELAY,
34
+    "tests=s"   => \$TESTS,
35
+    "dumps=s"   => \$DUMPS,
36
+    "repeat!"   => \$REPEAT,
37
+);
38
+
31 39
 
32 40
 sub clear {
33 41
     if ($PLATFORM eq 'windows') {