summaryrefslogtreecommitdiff
path: root/LedgerSMB/Database.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-07 20:30:51 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-07 20:30:51 +0000
commit434b77dec2e872107bd4170a3d0afde196ee8b27 (patch)
tree415c3e1d2b68de1db857f2d34c0640d2bca5b3bb /LedgerSMB/Database.pm
parent6d79290353692e1f1947edb1f3092ecd02000acc (diff)
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
Diffstat (limited to 'LedgerSMB/Database.pm')
-rw-r--r--LedgerSMB/Database.pm5
1 files changed, 3 insertions, 2 deletions
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 $!;
}