changeset 27:789877ff0e1a

Changing dbparams to contain all settings
author Dominic Cleal <dominic@computerkb.co.uk>
date Sun, 25 Jan 2009 17:33:07 +0000
parents be92d2f1ab3f
children 61fb1a6de2c5
files reproctool.cgi
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/reproctool.cgi	Sun Jan 25 17:31:03 2009 +0000
+++ b/reproctool.cgi	Sun Jan 25 17:33:07 2009 +0000
@@ -9,12 +9,18 @@
 use LWP::UserAgent;
 use Storable qw/store_fd fd_retrieve/;
 
-# Settings
-my $img_http_path = '/itemimgs';
-my $eve_central_url = 'http://eve-central.com/api/evemon';
-my $marks_cache = 'minerals.cache';
-my $marks_cache_expiry = 4 * 60 * 60;  # 4 hours
+# Settings from params.cgi
+our (@dbparams, $img_http_path, $eve_central_url,
+     $marks_cache, $marks_cache_expiry);
 
+$img_http_path = '/itemimgs';
+$eve_central_url = 'http://eve-central.com/api/evemon';
+$marks_cache = 'minerals.cache';
+$marks_cache_expiry = 4 * 60 * 60;  # 4 hours
+
+require './params.cgi';
+
+# Begin script
 my $cgi = new CGI;
 print $cgi->header(-type    => 'text/html',
                    -pragma  => 'no-cache',
@@ -136,8 +142,6 @@
 my $mega = $cgi->param('mega') || user_error('No megacyte price');
 my $morp = $cgi->param('morp') || user_error('No morphite price');
 
-our @dbparams;
-require './dbparams.cgi';
 my $db = DBI->connect(@dbparams)
     or die("Database connection failure: $DBI::errstr");