Source

Kephra / lib / Kephra / CommandList.pm

Full commit
use strict;
use warnings;

package Kephra::CommandList;

my %list;
my %object_alias;

sub _raw { \%list }
sub init {
	%list = %{ Kephra::Config::Default::commandlist() };
	for (values %list){
		$_->{'callref'} = eval 'sub {'. $_->{'function'}.'}';
	}
}

sub add_function_alias_var {
}
sub add_cmd {}

sub cmd_properties {
	my $cmd = shift;
	return $list{ $cmd } if exists $list{ $cmd }
}
sub cmd_value {
	my ($cmd, $value) = @_;
	return $list{ $cmd }{ $value} 
		if exists $list{ $cmd } and exists $list{ $cmd }{ $value};

}


1;