Recommendation for simple Web Frameworks

David Cantrell david at cantrell.org.uk
Tue Jan 11 14:28:04 GMT 2011


On Mon, Jan 10, 2011 at 10:00:39PM +0000, John Imison wrote:

> Out of interest, does anyone use CGI::Application?  What are the general 
> thoughts on that?

I've looked at it, but never used it because it seems utterly pointless.
It seems to be a fancy way of writing this ...

$actions = {
  foo => \&do_foo,
  bar => \&do_bar,
  baz => \&do_baz
};

if(my $action_sub = $actions->{$q->param('action')}) {
  $action_sub->()
} else {
  unknown_action_error()
}

-- 
header   FROM_DAVID_CANTRELL    From =~ /david.cantrell/i
describe FROM_DAVID_CANTRELL    Message is from David Cantrell
score    FROM_DAVID_CANTRELL    15.72 # This figure from experimentation


More information about the london.pm mailing list