our $VERSION = '0.001';
use Gruntmaster::Daemon::Constants qw/ERR/;
-use Gruntmaster::Daemon::Format qw/mkrun/;
+use Gruntmaster::Daemon::Format qw/prepare_files/;
use Gruntmaster::Data;
use File::Basename qw/fileparse/;
safe_can_nodie @_ or get_logger->logdie("No such \l$type: '$name'");
}
-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";
- die 'Compile error' if $?
-}
-
-sub prepare_files{
- my $meta = shift;
-
- for my $file (values $meta->{files}) {
- my ($format, $name, $content) = @{$file}{qw/format name content/};
-
- $file->{run} = mkrun($format);
- write_file $name, $content;
- prepare $name, $format;
- }
-}
-
sub process{
my $job = shift;
use IPC::Signal qw/sig_name sig_num/;
our $VERSION = '0.001';
-our @EXPORT_OK = qw/mkrun/;
+our @EXPORT_OK = qw/prepare_files/;
##################################################
}
}
+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";
+ die 'Compile error' if $?
+}
+
+sub prepare_files{
+ my $meta = shift;
+
+ for my $file (values $meta->{files}) {
+ my ($format, $name, $content) = @{$file}{qw/format name content/};
+
+ $file->{run} = mkrun($format);
+ write_file $name, $content;
+ prepare $name, $format;
+ }
+}
+
1