diff options
| author | fukachan <fukachan> | 2004-05-19 10:19:19 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-05-19 10:19:19 +0000 |
| commit | ab330cf85faa965e8d8f39652788bc6700ff9a10 (patch) | |
| tree | f0131dd5e85a75dda43cdc40b9813df0aa6ac2e8 | |
| parent | 43afdefddee2f9b3276e3786ed16968a29f9d36c (diff) | |
| download | fml8-ab330cf85faa965e8d8f39652788bc6700ff9a10.tar.gz fml8-ab330cf85faa965e8d8f39652788bc6700ff9a10.tar.bz2 fml8-ab330cf85faa965e8d8f39652788bc6700ff9a10.zip | |
-o overwrite options runs twice to ensure overwrite.
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 4d1bd2af..0080f751 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.226 2004/04/17 13:25:14 fukachan Exp $ +# $FML: Kernel.pm,v 1.227 2004/04/27 13:36:40 fukachan Exp $ # package FML::Process::Kernel; @@ -132,6 +132,7 @@ sub new while (($k, $v) = each %$opts) { $cfargs->{ $k } = $v;} } + # 2.1 speculate $fml_owner_home_dir by the current process uid # XXX we should compare $fml_owner and $< ? { @@ -920,6 +921,14 @@ sub load_config_files $config->overload( $cf ); } + # overwrite variables by -o options (2) + my $options = $curproc->command_line_options(); + if (defined $options->{ o }) { + my ($k, $v); + my $opts = $options->{ o } || {}; + while (($k, $v) = each %$opts) { $config->set($k, $v);} + } + # XXX We need to expand variables after we load all *cf files. # XXX 2001/05/05 changed to dynamic expansion for hook # $curproc->config()->expand_variables(); |
