On 5/18/05, $Bill Luebkert <[EMAIL PROTECTED]> wrote:
> 
> Even with the goto's, you could just verify that the state vrbl
> was legit (using a hash) and then just do the goto without all
> the rest of the junk.
> 
> if (exists $hash{$state}) {
>         goto $state;
> } else {
>         error
> }

even more succinctly, define the routines as coderefs stored
in the hash, then do something like this

      &{$PhaseHandlers{$phase} || \&UnknownPhaseError};






-- 
David L Nicol
Twinkies and Wonderbread are mainstream Americana

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to