#!/usr/bin/perl BEGIN { my $homedir = ( getpwuid($>) )[7]; my @user_include; foreach my $path (@INC) { if ( -d $homedir . '/perl' . $path ) { push @user_include, $homedir . '/perl' . $path; } } unshift @INC, @user_include; } BEGIN { $SCRIPT_PATH = $ENV{SCRIPT_FILENAME}; if($SCRIPT_PATH) { $SCRIPT_PATH =~ s/[^\\\/]+$//; } else { $SCRIPT_PATH = "."; } push @INC,$SCRIPT_PATH; } use AStoreProxy; require "cgi-lib.pl"; # change the below file to a different file only if you are setting up # multiple astores with astore proxy $configfile = 'astoreconfig.txt'; ReadParse(); $puri = $in{_puri}; $storeid = $in{_storeid}; $AStoreProxy::SCRIPT_PATH = $SCRIPT_PATH; $asp = new AStoreProxy; $asp->readconfig($configfile); $asp->get($puri,$storeid); $asp->print($puri);