From 496fffaa1f2582bd36d8426a0dcf22d94c5fd849 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 3 Feb 2014 12:31:02 +0200 Subject: [PATCH] Update gruntmaster-compile behaviour to match POD --- gruntmaster-compile | 5 ++++- lib/Gruntmaster/Daemon/Format.pm | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) 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 $? } -- 2.39.2