i have a big web application running in perl CGI. It’s running ok, it’s well written, but as it was done in the past, all the html are defined hardcoded in the CGI calls, so as you could imagine, it’s hard to mantain, improve and etc. So now i would like to start to add some templating and integrate with a framework (catalyst or CGI::application). My question is: Somebody here has an experience like that? There is any things that i must pay attention for? I’m aware that with both frameworks i can run native CGI scripts, so it’s good because i can run both (CGI native ad ‘frameworked’ code) together without any trauma. Any tips?
Share
Write tests first (for example with
Test::WWW::Mechanize). Then when you change things you always know if something breaks, and what it is that breaks.Then extract HTML into templates, and commonly used subs into modules. After that it’s a piece of cake to switch to a framework.
In general, go step by step so that you always have a working application.