NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Step 1: Use MVC (Score:2)
I'm a big fan of CGI::Application, where you write subclasses that are Controllers. Within that subclass, you write subs that handle states of the webapp and yeah, when you first pick it up, you find yourself putting HTML and SQL code in there, but as you learn and evolve, there's either support built-in to cgiapp or plugins that offer support for templates, db abstraction, etc.
- Jason
Reply to This
Re: (Score:2)
That's another reason why I rather like Catalyst and Jifty -- cleaner separation of concerns. While CGI::Application doesn't do as much heavy lifting, it still seems like a much better idea that what most folks do. Plus, if you can at least remember to keep the three logic types in their appropriate layers, you make refactoring much easier because of the looser coupling.
And years ago, I wrote code like my first example, too. In fact, I remember when chromatic came and worked at the same company I did a
Re: (Score:1)
Any deployed codebase used by actual customers and funded by people who won't put up with infinite deadlines has some technical debt. Your code wasn't the problem. (At least, I can't remember ever having to fix a bug in code you'd written.)