in reply to Complex dispatch table

Your method of distinguishing between module subs and subroutines in the current package seems a bit cumbersome.

I wouldn't use arrays but hashes, where the key names make the code self documenting. Than you could do something like:

$command{'modules loadall'}->{'function'}={ ( "Module" => "MAIN", "Function" => "loadmodul +es" )};
A function that does not live in the current package would of course have the actual module name in Module. This way, you can call any function through your modulemethod sub and you don't need the if($params->{'function'}[0] eq '') bit.

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: Complex dispatch table
by castaway (Parson) on Feb 20, 2003 at 20:14 UTC
    Since I'm not calling the method from the module directly, but from an object of created from the module, I still need to find out if it's a local function or not.
    Thanks for the idea though.

    C.