diff options
| author | fukachan <fukachan> | 2004-01-02 02:10:27 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-01-02 02:10:27 +0000 |
| commit | 63f8e58437c9515050415f9a619348c478d39c2b (patch) | |
| tree | 0993ea2873bc8b16527d23937a86a5df5a150c15 | |
| parent | 1a8b84bb3d2b9824a34ceb507cdf605dabefbc15 (diff) | |
| download | fml8-63f8e58437c9515050415f9a619348c478d39c2b.tar.gz fml8-63f8e58437c9515050415f9a619348c478d39c2b.tar.bz2 fml8-63f8e58437c9515050415f9a619348c478d39c2b.zip | |
+set_config_files_list()
+append_to_config_files_list()
+get_config_files_list()
| -rw-r--r-- | fml/lib/FML/Process/Utils.pm | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm index 994a9673..c437d15b 100644 --- a/fml/lib/FML/Process/Utils.pm +++ b/fml/lib/FML/Process/Utils.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: Utils.pm,v 1.99 2003/12/30 03:46:35 fukachan Exp $ +# $FML: Utils.pm,v 1.100 2004/01/01 23:52:18 fukachan Exp $ # package FML::Process::Utils; @@ -791,6 +791,65 @@ sub command_line_options } +=head2 set_config_files_list($cf_file_path_array) + +set configuration file (.cf) to internal list. + +=head2 append_to_config_files_list($cf_file_path) + +append configuration file (.cf) to internal list. + +=head2 get_config_files_list() + +get configuration files (*.cf) list as ARRAY_REF. + +=cut + + +# Descriptions: set configuration file (.cf) to internal list. +# Arguments: OBJ($curproc) ARRAY_REF($path) +# Side Effects: none +# Return Value: ARRAY_REF +sub set_config_files_list +{ + my ($curproc, $path) = @_; + my $args = $curproc->{ __parent_args }; + + if (ref($path) eq 'ARRAY') { + $args->{ cf_list } = $path || []; + } + else { + $curproc->logerror("set_config_files_list: invalid input"); + } +} + +# Descriptions: append configuration file (.cf) to internal list. +# Arguments: OBJ($curproc) STR($path) +# Side Effects: none +# Return Value: ARRAY_REF +sub append_to_config_files_list +{ + my ($curproc, $path) = @_; + my $args = $curproc->{ __parent_args }; + + my $p = $args->{ cf_list } || []; + push(@$p, $path); + $args->{ cf_list } = $p; +} + +# Descriptions: get configuration files (*.cf) list as ARRAY_REF. +# Arguments: OBJ($curproc) +# Side Effects: none +# Return Value: ARRAY_REF +sub get_config_files_list +{ + my ($curproc) = @_; + my $args = $curproc->{ __parent_args }; + + return( $args->{ cf_list } || [] ); +} + + =head2 ml_name() not yet implemenetd properly. (?) |
