Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created September 20, 2010 12:21
Show Gist options
  • Save wchristian/587821 to your computer and use it in GitHub Desktop.
Save wchristian/587821 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
BEGIN {
$ENV{CAP_DEVPOPUP_EXEC} = 0;
$ENV{CGI_APP_DEBUG} = 1;
}
use lib "..";
use Games::EveOnline::MarketOrders;
use CGI::Fast();
# if there are command line parameters, load them into ENV, in case we're not running on a web server
$ENV{PATH_INFO} = $ARGV[0] if @ARGV;
$ENV{CGIAPP_CONFIG_FILE} ||= '../market_config.ini';
my $webapp = Games::EveOnline::MarketOrders->new(
PARAMS => {
'cfg_file' => $ENV{CGIAPP_CONFIG_FILE}
}
);
while (my $q = new CGI::Fast) {
delete $webapp->{$_} for qw( __PRERUN_MODE __CAP__SESSION_OBJ sess query_vars __HEADER_PROPS );
$webapp->query( $q );
$webapp->run();
}
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment