X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon%2FFormat.pm;h=5b5081e97a9682030d331074244c8adba9055478;hp=86c194ab3866b8876601acd5c41dd04dc78fb578;hb=03007d04328a9959143a7c6ad8128a4bca454620;hpb=bc3729599a66921e1efd9f801222e814c626ea76 diff --git a/lib/Gruntmaster/Daemon/Format.pm b/lib/Gruntmaster/Daemon/Format.pm index 86c194a..5b5081e 100644 --- a/lib/Gruntmaster/Daemon/Format.pm +++ b/lib/Gruntmaster/Daemon/Format.pm @@ -8,12 +8,14 @@ no if $] > 5.017011, warnings => 'experimental::smartmatch'; use POSIX qw//; use File::Basename qw/fileparse/; +use File::Slurp qw/write_file/; use Gruntmaster::Daemon::Constants qw/TLE OLE DIED NZX/; use Time::HiRes qw/alarm/; use List::MoreUtils qw/natatime/; +use Log::Log4perl qw/get_logger/; use IPC::Signal qw/sig_name sig_num/; -our $VERSION = "5999-TRIAL"; +our $VERSION = "5999.000_001"; our @EXPORT_OK = qw/prepare_files/; ################################################## @@ -70,12 +72,10 @@ 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 .= "\n"; + $Gruntmaster::Daemon::errors .= `gruntmaster-compile $format $name 2>&1`; + $Gruntmaster::Daemon::errors .= "\n"; die 'Compile error' if $? }