Pārlūkot izejas kodu

Added CLI using Getopt::Long

Alois Mahdal 12 gadus atpakaļ
vecāks
revīzija
50f823f011
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8
    0
      bin/autotest.pl

+ 8
- 0
bin/autotest.pl Parādīt failu

20
 use v5.10;
20
 use v5.10;
21
 use warnings;
21
 use warnings;
22
 use File::Spec;
22
 use File::Spec;
23
+use Getopt::Long;
23
 
24
 
24
 my $PLATFORM    = (-d "c:\\windows" ? 'windows' : 'unix' );
25
 my $PLATFORM    = (-d "c:\\windows" ? 'windows' : 'unix' );
25
 my $DELAY       = 5;
26
 my $DELAY       = 5;
28
 my $REPEAT      = 1;
29
 my $REPEAT      = 1;
29
 my $TESTS       = "t";
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
 sub clear {
40
 sub clear {
33
     if ($PLATFORM eq 'windows') {
41
     if ($PLATFORM eq 'windows') {