summaryrefslogtreecommitdiff
path: root/LedgerSMB/Sysconfig.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-12 20:46:20 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-12 20:46:20 +0000
commitdf073d6e09c0f87fb2e88cc215ace843a5851d4a (patch)
tree1c15ce909d3e0353b21bbd909e6720fd485a3a53 /LedgerSMB/Sysconfig.pm
parent65458125b8f3814fd6ef4d07b55ab69f62f5a528 (diff)
Formatting with Perltidy
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1068 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Sysconfig.pm')
-rw-r--r--LedgerSMB/Sysconfig.pm96
1 files changed, 52 insertions, 44 deletions
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm
index a425ba4f..c1924916 100644
--- a/LedgerSMB/Sysconfig.pm
+++ b/LedgerSMB/Sysconfig.pm
@@ -1,4 +1,4 @@
-# This is the new configuration file for LedgerSMB. Eventually all system
+# This is the new configuration file for LedgerSMB. Eventually all system
# configuration directives will go here, This will probably not fully replace
# the ledgersmb.conf until 1.3, however.
@@ -6,21 +6,26 @@ package LedgerSMB::Sysconfig;
use LedgerSMB::Form;
use Config::Std;
-use DBI qw(:sql_types);
+use DBI qw(:sql_types);
# For Win32, change $pathsep to ';';
-$pathsep=':';
+$pathsep = ':';
-$session='DB';
-$logging=0; # No logging on by default
+$session = 'DB';
+$logging = 0; # No logging on by default
@io_lineitem_columns = qw(unit onhand sellprice discount linetotal);
# Whitelist for redirect destination
-@scripts = ('aa.pl', 'admin.pl', 'am.pl', 'ap.pl', 'ar.pl', 'arap.pl',
- 'arapprn.pl', 'bp.pl', 'ca.pl', 'cp.pl', 'ct.pl', 'gl.pl', 'hr.pl',
- 'ic.pl', 'io.pl', 'ir.pl', 'is.pl', 'jc.pl', 'login.pl', 'menu.pl',
- 'oe.pl', 'pe.pl', 'pos.pl', 'ps.pl', 'pw.pl', 'rc.pl', 'rp.pl');
+@scripts = (
+ 'aa.pl', 'admin.pl', 'am.pl', 'ap.pl',
+ 'ar.pl', 'arap.pl', 'arapprn.pl', 'bp.pl',
+ 'ca.pl', 'cp.pl', 'ct.pl', 'gl.pl',
+ 'hr.pl', 'ic.pl', 'io.pl', 'ir.pl',
+ 'is.pl', 'jc.pl', 'login.pl', 'menu.pl',
+ 'oe.pl', 'pe.pl', 'pos.pl', 'ps.pl',
+ 'pw.pl', 'rc.pl', 'rp.pl'
+);
# if you have latex installed set to 1
$latex = 1;
@@ -35,7 +40,7 @@ $userspath = "users";
$templates = "templates";
# Temporary files stored at"
-$tempdir = ($ENV{TEMP} || '/tmp');
+$tempdir = ( $ENV{TEMP} || '/tmp' );
# Backup path
$backuppath = $tempdir;
@@ -47,7 +52,7 @@ $memberfile = "users/members";
$sendmail = "/usr/sbin/sendmail -t";
# SMTP settings
-$smtphost = '';
+$smtphost = '';
$smtptimout = 60;
# set language for login and admin
@@ -63,65 +68,68 @@ $gzip = "gzip -S .gz";
$localepath = 'locale/po';
# available printers
-%printer = ( Laser => 'lpr -Plaser',
- Epson => 'lpr -PEpson',
- );
+%printer = (
+ Laser => 'lpr -Plaser',
+ Epson => 'lpr -PEpson',
+);
my %config;
-read_config('ledgersmb.conf' => %config) or die;
+read_config( 'ledgersmb.conf' => %config ) or die;
# We should clean this code up for 1.3 :-) Chris T.
$logging = $config{''}{logging} if $config{''}{logging};
-$check_max_invoices = $config{''}{check_max_invoices} if
- $config{''}{check_max_invoices};
+$check_max_invoices = $config{''}{check_max_invoices}
+ if $config{''}{check_max_invoices};
$language = $config{''}{language} if $config{''}{language};
-$session = $config{''}{session} if $config{''}{session};
-$latex = $config{''}{latex} if $config{''}{latex};
+$session = $config{''}{session} if $config{''}{session};
+$latex = $config{''}{latex} if $config{''}{latex};
-$ENV{PATH} .= $pathsep.(join $pathsep, @{$config{environment}{PATH}}) if
- $config{environment}{PATH};
-$ENV{PERL5LIB} .= ":".(join ':', @{$config{environment}{PERL5LIB}}) if
- $config{environment}{PERL5LIB};
+$ENV{PATH} .= $pathsep . ( join $pathsep, @{ $config{environment}{PATH} } )
+ if $config{environment}{PATH};
+$ENV{PERL5LIB} .= ":" . ( join ':', @{ $config{environment}{PERL5LIB} } )
+ if $config{environment}{PERL5LIB};
-%printer = %{$config{printers}} if $config{printers};
+%printer = %{ $config{printers} } if $config{printers};
$localepath = $config{paths}{localepath} if $config{paths}{localepath};
-$spool = $config{paths}{spool} if $config{paths}{spool};
-$templates = $config{paths}{templates} if $config{paths}{templates};
-$tempdir = $config{paths}{tempdir} if $config{paths}{tempdir};
-$userspath = ($config{paths}{userspath})
- ? $config{paths}{userspath} : $tempdir;
+$spool = $config{paths}{spool} if $config{paths}{spool};
+$templates = $config{paths}{templates} if $config{paths}{templates};
+$tempdir = $config{paths}{tempdir} if $config{paths}{tempdir};
+$userspath =
+ ( $config{paths}{userspath} ) ? $config{paths}{userspath} : $tempdir;
$gzip = $config{programs}{gzip} if $config{programs}{gzip};
-$sendmail = $config{mail}{sendmail} if $config{mail}{sendmail};
-$smtphost = $config{mail}{smtphost} if $config{mail}{smtphost};
+$sendmail = $config{mail}{sendmail} if $config{mail}{sendmail};
+$smtphost = $config{mail}{smtphost} if $config{mail}{smtphost};
$smtptimeout = $config{mail}{smtptimeout} if $config{mail}{smtptimeout};
# We used to have a global dbconnect but have moved to single entries
$globalDBhost = $config{globaldb}{DBhost} if $config{globaldb}{DBhost};
$globalDBport = $config{globaldb}{DBport} if $config{globaldb}{DBport};
$globalDBname = $config{globaldb}{DBname} if $config{globaldb}{DBname};
-$globalDBUserName = $config{globaldb}{DBUserName} if $config{globaldb}{DBUserName};
-$globalDBPassword = $config{globaldb}{DBPassword} if $config{globaldb}{DBPassword};
+$globalDBUserName = $config{globaldb}{DBUserName}
+ if $config{globaldb}{DBUserName};
+$globalDBPassword = $config{globaldb}{DBPassword}
+ if $config{globaldb}{DBPassword};
#putting this in an if clause for now so not to break other devel users
-if ($config{globaldb}{DBname}){
- my $dbconnect = "dbi:Pg:dbname=$globalDBname host=$globalDBhost
+if ( $config{globaldb}{DBname} ) {
+ my $dbconnect = "dbi:Pg:dbname=$globalDBname host=$globalDBhost
port=$globalDBport user=$globalDBUserName
- password=$globalDBPassword"; # for easier debugging
- $GLOBALDBH = DBI->connect($dbconnect);
- if (!$GLOBALDBH){
- $form = new Form;
- $form->error("No GlobalDBH Configured or Could not Connect");
- }
+ password=$globalDBPassword"; # for easier debugging
+ $GLOBALDBH = DBI->connect($dbconnect);
+ if ( !$GLOBALDBH ) {
+ $form = new Form;
+ $form->error("No GlobalDBH Configured or Could not Connect");
+ }
}
-# These lines prevent other apps in mod_perl from seeing the global db
+# These lines prevent other apps in mod_perl from seeing the global db
# connection info
my $globalDBConnect = undef;
-my $globalUserName = undef;
-my $globalPassword = undef;
+my $globalUserName = undef;
+my $globalPassword = undef;
1;