in reply to Re: CGI/Mod Perl Application Design philosophy - which way do we go?
in thread CGI/Mod Perl Application Design philosophy - which way do we go?
and then my if else based tree. For example, I have written small apps that manage lookup tables for databases where the data they contain is less than 20 rows in size. Adding a confirmation screen then becomes:my $action = $query->param('ACTION'); unless(defined($action)) { $action = 'default'; }
I find that this enables me to also port my code. Sadly, my new job involves some ASP programming (sigh) and have ported this technique to the small apps I have written there.if($action eq 'delete') { $confirmed = $query->param('CONFIRMED') if($confirmed eq 'yes') { # do stuff } else { # do other stuff } }
|
---|