diff options
| author | fukachan <fukachan> | 2001-01-21 07:34:21 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-01-21 07:34:21 +0000 |
| commit | bf33b8b2b70b0c6258187bfe8dcf986d6981c524 (patch) | |
| tree | 8e8a5339fa94da6d6880c3db8441cf6f9c02b723 /fml/lib | |
| parent | 1814de0f552923cd6cd6aef2d9682b9f0970052b (diff) | |
| download | fml8-bf33b8b2b70b0c6258187bfe8dcf986d6981c524.tar.gz fml8-bf33b8b2b70b0c6258187bfe8dcf986d6981c524.tar.bz2 fml8-bf33b8b2b70b0c6258187bfe8dcf986d6981c524.zip | |
import ml_home_dir from fmlwrapper
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Config.pm | 9 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/fml/lib/FML/Config.pm b/fml/lib/FML/Config.pm index b76262ca..0eee4aea 100644 --- a/fml/lib/FML/Config.pm +++ b/fml/lib/FML/Config.pm @@ -14,10 +14,17 @@ use Carp; sub new { - my ($self) = @_; + my ($self, $args) = @_; unless (defined %_fml_config) { %_fml_config = ();} my $me = \%_fml_config; + + # import variables + if (defined $args) { + my ($k, $v); + while (($k, $v) = each %$args) { set($me, $k, $v);} + } + return bless $me, $self; } diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 8596b082..f3a62889 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -24,10 +24,19 @@ sub new { my ($self, $args) = @_; my ($curproc) = {}; # alloc memory as the struct current_process. + my $cfargs = {}; + + # import variables + if ($args->{ ml_home_dir }) { + $cfargs->{ ml_home_dir } = $args->{ ml_home_dir }; + } + else { + croak "ml_home_dir is not defined.\n"; + } # bind FML::Config object to $curproc use FML::Config; - $curproc->{ config } = new FML::Config; + $curproc->{ config } = new FML::Config $cfargs; bless $curproc, $self; |
