package My::MyApp::Admin; use base 'CGI::Application'; use CGI::Application::Plugin::ConfigAuto qw/cfg/; use CGI::Application::Plugin::DBH (qw/dbh_config dbh/); use CGI::Application::Plugin::Authentication; use CGI::Application::Plugin::HtmlTidy; sub cgiapp_init {    my $self = shift;        My::MyApp::Admin::->authen->config(          DRIVER => [ 'Generic', { user1 => '123' } ],    );        #$self->authen->protected_runmodes(':all');    My::MyApp::Admin::authen->protected_runmodes(':all'); } # /cgiapp_init sub setup {    my $self = shift;        $self->start_mode('start');    $self->run_modes(                     start => 'aufgabenbereich',                     authentifikationsFormular => 'authentifikationsFormular',                     logout => 'logout',                    );     } # /setup sub aufgabenbereich {    my $self = shift;                return "Mein Aufgabenbereich"; } # /authen_mode sub authentifikationsFormular {    my $self = shift;        my $t = $self->load_tmpl('_admin_loginFormular.tmpl');    $t->param("CMS" => $self->query->url(-full => 1,));    return $t->output();        return "Formular zum einloggen"; } # /authentifikationsFormular sub logout {    my $self = shift;        return "logout formular"; } # /logout sub cgiapp_postrun {    my $self = shift;    my $output_ref = shift;        # Sete den Rahmen um den Inhalt, der in den verschiedenen Runmodes erstellt wurde.        my $t = $self->load_tmpl('_admin_hauptTemplate.tmpl', associate => $self);    $t->param('Seiteninhalt' => $$output_ref);    $$output_ref = $t->output();        $self->htmltidy_clean($output_ref);     } # /cgiapp_postrun 1;