diff options
| author | fukachan <fukachan> | 2001-02-18 04:56:11 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-18 04:56:11 +0000 |
| commit | adefc3267af98da52b4eafd9df0ada36ea36803a (patch) | |
| tree | 20f36ab8d9621abab6ee073efbf4602907f43fab /fml/lib/FML/Process/Kernel.pm | |
| parent | c138f7bb48a8a34ef904ae942f19075ec3020f57 (diff) | |
| download | fml8-adefc3267af98da52b4eafd9df0ada36ea36803a.tar.gz fml8-adefc3267af98da52b4eafd9df0ada36ea36803a.tar.bz2 fml8-adefc3267af98da52b4eafd9df0ada36ea36803a.zip | |
fix how to work when $argv[0] is not specified
Diffstat (limited to 'fml/lib/FML/Process/Kernel.pm')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 7 |
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"; } } |
