no if $] > 5.017011, warnings => 'experimental::smartmatch';
use File::Copy qw/copy/;
+use File::Basename qw/fileparse/;
+
+my ($format, $name) = @ARGV;
+my $basename = fileparse $name, qr/\..*/;
-my ($format, $basename, $name) = @ARGV;
my $ret = fork // die $!;
if ($ret) {
$SIG{ALRM} = sub {kill KILL => $ret};
exec 'g++', qw/-DONLINE_JUDGE -std=gnu++11 -fabi-version=6 -Wall -Wextra -O2 -o/, $basename, $name when 'CPP';
exec 'gmcs', '-d:ONLINE_JUDGE', $name when 'MONO';
exec 'javac', $name when 'JAVA';
- exec 'fpc', qw/-dONLINE_JUDGE -O2 -n/, $name when 'PASCAL';
+ exec 'fpc', qw/-dONLINE_JUDGE -O2/, $name when 'PASCAL';
copy $name, $basename when ['PERL', 'PYTHON']
}
}
=item PASCAL
- fpc -dONLINE_JUDGE -O2 -n $input
+ fpc -dONLINE_JUDGE -O2 $input
=item PERL