From a0fbd781d3cd716891365919a189a3288ad0ebc9 Mon Sep 17 00:00:00 2001 From: tetragon Date: Thu, 18 Oct 2007 02:35:07 +0000 Subject: Fixing 1814437 git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1784 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Sysconfig.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index 6474dfd6..8d4c281b 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -87,10 +87,16 @@ $language = $config{''}{language} if $config{''}{language}; $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}; +if (ref $config{environment}{PATH} eq 'ARRAY') { + $ENV{PATH} .= $pathsep . ( join $pathsep, @{ $config{environment}{PATH} } ); +} elsif ($config{environment}{PATH}) { + $ENV{PATH} .= $pathsep . $config{environment}{PATH}; +} +if (ref $config{environment}{PERL5LIB} eq 'ARRAY') { + $ENV{PERL5LIB} .= ":" . ( join ':', @{ $config{environment}{PERL5LIB} } ); +} elsif ($config{environment}{PERL5LIB}) { + $ENV{PERL5LIB} .= ":" . $config{environment}{PERL5LIB}; +} %printer = %{ $config{printers} } if $config{printers}; -- cgit v1.2.3