6 |
my $out_dir; |
my $out_dir; |
7 |
my $file_pattern; |
my $file_pattern; |
8 |
my $domtest2perl = 'domtest2perl.pl'; |
my $domtest2perl = 'domtest2perl.pl'; |
9 |
|
my %Opt = ( |
10 |
|
test2perl_option => [], |
11 |
|
); |
12 |
GetOptions ( |
GetOptions ( |
13 |
|
'domtest2perl-option=s' => sub { |
14 |
|
shift; |
15 |
|
push @{$Opt{test2perl_option}}, shift; |
16 |
|
}, |
17 |
'domtest2perl-path=s' => \$domtest2perl, |
'domtest2perl-path=s' => \$domtest2perl, |
18 |
'test-directory=s' => \$dir, |
'test-directory=s' => \$dir, |
19 |
'test-file-pattern=s' => \$file_pattern, |
'test-file-pattern=s' => \$file_pattern, |
33 |
} |
} |
34 |
my @cmd = ('perl', map ({"-I$_"} @INC), |
my @cmd = ('perl', map ({"-I$_"} @INC), |
35 |
$domtest2perl, $in_file, |
$domtest2perl, $in_file, |
36 |
'--output-file' => $out_file); |
'--output-file-name' => $out_file, |
37 |
#print STDERR join " ", @cmd, "\n"; |
@{$Opt{test2perl_option}}); |
38 |
|
print STDERR join " ", @cmd, "\n"; |
39 |
print STDERR $in_file, "\n"; |
print STDERR $in_file, "\n"; |
40 |
print STDERR '-> ' . $out_file, "\n"; |
print STDERR '-> ' . $out_file, "\n"; |
41 |
system @cmd and die "$0: $domtest2perl: $@"; |
system @cmd and die "$0: $domtest2perl: $@"; |