#! /usr/bin/perl use warnings; use strict; sub handler {         my $r = Apache::Request->new(shift);     $r->send_http_header('text/html');          my $action = $r->param('action') || 'start';          unless ( exists $BoardConf::Actions{$action)->{subs} ) {         $action = 'start'; # error     } # unless          foreach my $sub (@{ $BoardConf::Actions{$action}->{subs} }) {         unless ($sub->($r)) {             # error in sub             last; # errorhandling         } # unless         else {             # ok         } # else     } # foreach } # handler