From 434b77dec2e872107bd4170a3d0afde196ee8b27 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 7 Nov 2007 20:30:51 +0000 Subject: Converting backticks to use system() to avoid many problems on Windows git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1858 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Database.pm | 5 +++-- LedgerSMB/IS.pm | 2 +- LedgerSMB/User.pm | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Database.pm b/LedgerSMB/Database.pm index 0bfc2666..3edc91f0 100644 --- a/LedgerSMB/Database.pm +++ b/LedgerSMB/Database.pm @@ -71,7 +71,7 @@ Creates a database with the characteristics in the object sub create { my $self = (@_); $self->_init_environment(); - `createdb $self->{dbname}`; + system('createdb $self->{dbname}'); my $error = $!; if ($error){ $self->error($!); @@ -108,7 +108,8 @@ sub create { # Private method. Executes the sql script in psql. sub _execute_script { my ($self, $script) = @_; - `psql $self->{dbname} < 'sql/$script.sql'`; + # Note that this needs to be changed so that it works with Win32! + system('psql $self->{dbname} < "sql/$script.sql"'); return $!; } diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index fdb22861..5b82675a 100644 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -20,7 +20,7 @@ # Web: http://www.sql-ledger.org # # Contributors: Jim Rawlings -#` +# #====================================================================== # # This file has undergone whitespace cleanup. diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index e4654d9b..659ad7e1 100644 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -426,7 +426,7 @@ sub process_query { $ENV{PGHOST} = $form->{dbhost}; $ENV{PGPORT} = $form->{dbport}; - $results = `psql -f $filename 2>&1`; + $results = system('psql -f $filename 2>&1'); if ($?) { $form->error($!); } -- cgit v1.2.3