diff options
| author | fukachan <fukachan> | 2001-02-27 16:00:50 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-27 16:00:50 +0000 |
| commit | de534bd68533eb3b7da42690fdf112a22a969368 (patch) | |
| tree | e240d75124b10eda3984bfd035f2e9b574494e4c /fml/lib/FML/Config.pm | |
| parent | 1b2afdbbe3c7a0233655501a0094415814795944 (diff) | |
| download | fml8-de534bd68533eb3b7da42690fdf112a22a969368.tar.gz fml8-de534bd68533eb3b7da42690fdf112a22a969368.tar.bz2 fml8-de534bd68533eb3b7da42690fdf112a22a969368.zip | |
define $available_commands
$config->has_attribute(variable, attribute)
Diffstat (limited to 'fml/lib/FML/Config.pm')
| -rw-r--r-- | fml/lib/FML/Config.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fml/lib/FML/Config.pm b/fml/lib/FML/Config.pm index a3627991..665e5eb1 100644 --- a/fml/lib/FML/Config.pm +++ b/fml/lib/FML/Config.pm @@ -327,6 +327,21 @@ sub no } +# has_attribute( key, attribute ) +# e.g. has_attribute( "available_command_list" , "help" ); +sub has_attribute +{ + my ($self, $key, $attribute) = @_; + my (@attribute) = split(/\s+/, $_fml_config{$key}); + + for my $k (@attribute) { + return 1 if $k eq $attribute; + } + + return 0; +} + + sub FETCH { my ($self, $key) = @_; |
