#!/usr/bin/perl #!/usr/bin/speedy -- -M1 # This script is the interface to get the panel going # # There are three globals: # $::q - A CGI object (the query) # $::s - A CGI::Session object # $::p - The panel use strict; use App; use CGI; use CGI::Session; use Data::Dumper; use CGI::SpeedyCGI; my $sp = CGI::SpeedyCGI->new; $sp->register_cleanup(sub { if($::s) { $::s->param('App', $::a); $::s->close(); } }); my $realuser = (getpwuid($>))[0]; # Set up the Query and Session $::q = new CGI; mkdir "/tmp/$realuser", 0700; $::s = new CGI::Session(undef, $::q, {Directory=>"/tmp/$realuser/"}); $::a = $::s->param('App') || new App; print $::s->header(); # I would like to eliminate this bit... but I dont' know how # It fixes CGI::Session's save of the panel object my $VAR1; eval(Dumper($::a)); $::a = $VAR1; $::a->resume(); # And last but not least, start the application! $::a->start();