more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Just a few thoughts regarding the DBI code...
Try to create logical database requests, wrap those in perl subroutines, and place them in a separate module. This will greatly improve the readability of the main script, and will also improve maintainability. Avoid "select * ..." SQL statements. Be explicit in what you are querying, even if that makes the code more verbose - it'll again improve maintainability. One thing that is repeating a lot in the code is prepare/execute/fetch one row. Maybe you could use a utility subroutine that does that, something like:
Just using that could already simplify the code to a great extent. Michael In reply to Re: Re-Factoring: Philosophy and Approach
by mpeppler
|
|