#!/usr/bin/perl use strict; use WebInterface; WebInterface->new()->run(); #### #!/usr/bin/perl use strict; package WebInterface; use base 'CGI::Application'; use CGI::Session; use CGI::Application::Plugin::Authentication; use CGI; WebInterface->authen->config( STORE => ['Cookie', NAME => 'login', SECRET => 'not really so secret', EXPIRY => '1d', ], ); sub setup { my $self = shift; $self->start_mode('my_run_mode'); $self->run_modes([qw/ my_run_mode /]); $self->mode_param('my_run_mode'); } sub my_run_mode { my $self = shift; $self->authen->logout(); CGI::Session->new(); return ''; } 1;