summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Config.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-27 16:00:50 +0000
committerfukachan <fukachan>2001-02-27 16:00:50 +0000
commitde534bd68533eb3b7da42690fdf112a22a969368 (patch)
treee240d75124b10eda3984bfd035f2e9b574494e4c /fml/lib/FML/Config.pm
parent1b2afdbbe3c7a0233655501a0094415814795944 (diff)
downloadfml8-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.pm15
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) = @_;