weedom has asked for the wisdom of the Perl Monks concerning the following question:
I've had several roles now, where people look at code like the following and go yeuch!!! But to my mind this is using the CGI.pm module pretty efficiently.
What's the consensus, here? Forgetting the whole separate design from code question, incidentally. That's a whole 'nother conversation! :)
Example here:
start_form({ -action=>"/cgi-bin/ff-webclient.pl", -name=>'searchForm', -id=>'searchForm' }), fieldset( legend('Query finished/currently running jobs'), div({-class=>"instructions"},""), table({-class=>"ats"}, Tr( td([ label({-class=>'small', -for=>'ff_job_id'} +,'FaultFinder ID'), textfield({-name=>'ff_job_id',-id=>'ff_job +_id'}) ]) ), ## end of Tr Tr( td([ label({-class=>'small', -for=>"searchby_us +er"},"Username"), textfield({-name=>'searchby_user',-id=>'se +archby_user'}) ]) ), Tr( td([ label({-class=>'small', -for=>"searchby_st +atus"},"Status"), textfield({-name=>'searchby_status',-id=>' +searchby_status'}) ]) ), Tr( td([ label({-class=>'small', -for=>"searchby_da +te_start"},"Time"), "begin".br.textfield({-name=>'searchby_dat +e_start',-id=>'searchby_date_start',-onchange=>"checkDate(this)"}). b +r . "end" . br . textfield({-name=>'searchby_date_end',-id=>'searchby +_date_end',-onchange=>"checkDate(this)"}) ]) ), Tr( td({-colspan=>'2'}, submit({-name=>"right_submit_button",-valu +e=>"Go",-onmousedown=>"checkForm('searchForm')"}), hidden({-name=>"submitted", -value=>"get_e +xisting_ff"}) ) ## end of td ) ## end of Tr ) ## end of table )## end of fieldset(); )## end of second holding ) ## end of second holding td ) ## end of holding Tr ); ## end of holding table
|
|---|