summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Kernel.pm
diff options
context:
space:
mode:
Diffstat (limited to 'fml/lib/FML/Process/Kernel.pm')
-rw-r--r--fml/lib/FML/Process/Kernel.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index f260e0d8..57e70037 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -30,13 +30,16 @@ sub new
my ($cfargs) = {};
# import variables
- my (@import_vars) = qw(ml_home_prefix);
- push(@import_vars, 'ml_home_dir') if $args->{ need_ml_name };
+ my (@import_vars) = qw(ml_home_prefix ml_home_dir);
for my $var (@import_vars) {
if ($args->{ $var }) {
$cfargs->{ $var } = $args->{ $var };
}
else {
+ if ($var eq 'ml_home_dir' && (not $args->{ need_ml_name })) {
+ next;
+ }
+
croak "variable $var is not defined.\n";
}
}