From: Marius Gavrilescu Date: Mon, 3 Feb 2014 10:31:02 +0000 (+0200) Subject: Update gruntmaster-compile behaviour to match POD X-Git-Tag: 5999.000_001~3 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=496fffaa1f2582bd36d8426a0dcf22d94c5fd849;p=gruntmaster-daemon.git Update gruntmaster-compile behaviour to match POD --- diff --git a/gruntmaster-compile b/gruntmaster-compile index bc9c4f5..35a3424 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -3,8 +3,11 @@ use v5.14; 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}; diff --git a/lib/Gruntmaster/Daemon/Format.pm b/lib/Gruntmaster/Daemon/Format.pm index faa9209..99fe514 100644 --- a/lib/Gruntmaster/Daemon/Format.pm +++ b/lib/Gruntmaster/Daemon/Format.pm @@ -73,10 +73,9 @@ sub mkrun{ sub prepare{ my ($name, $format) = @_; our $errors; - my $basename = fileparse $name, qr/\.[^.]*/; get_logger->trace("Preparing file $name..."); - $errors .= `gruntmaster-compile $format $basename $name 2>&1`; + $errors .= `gruntmaster-compile $format $name 2>&1`; $errors .= "\n"; die 'Compile error' if $? }