Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
One thing that could extend this approach and possibly eliminate
the large quantity of ifs is to templatize the conditional.
Set it up so that the test and actions are defined in a config file and work via a generic test/action method. Granted the performance will probably drop, but the maintainability should increase. There also might be modules that support this sort of templating of a function, but i haven't seen them yet. (as i haven't had the need yet) In reply to Re: Re: The dreaded if-elsif-else construct (code)
by bastard
|
|