in reply to Re: Is there an ideal module size or subroutine size?
in thread Is there an ideal module size or subroutine size?
A state machine implementation is often done as a "switch" statement (read "if ... elsif ..." in Perl) and can get pretty long even when most of the work for each state is factored out into individual subs. There are ways to avoid the "switch" (dispatch tables for example), but often the operation of the state machine becomes less obvious.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Is there an ideal module size or subroutine size? (states)
by tye (Sage) on Aug 14, 2007 at 22:47 UTC | |
|
Re^3: Is there an ideal module size or subroutine size?
by roboticus (Chancellor) on Aug 14, 2007 at 21:35 UTC |