or download this
$Commands{'log'}{'function'} = sub { createlog(shift) };
$Commands{'modules saveall'}{'function'} = sub { savemodules() };
$Commands{'modules loadall'}{'function'} = sub { loadmodules(shift) };
# extra example for module call:
$Commands{'foo'}{'function'} = sub { Bar->foo(@_[0, 1]) };