From 5c0eb55659bc9f2864253567f8810ec2b87f287d Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 21 Jul 2009 03:27:23 +0000 Subject: [PATCH] get table created when Table->new() is called without -create option git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3838 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index c02ee66c5..35b58374c 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -195,7 +195,8 @@ sub new $self->{colnames} = \@{$self->{schema}->{cols}}; $self->{descriptions} = \%{$self->{schema}->{descriptions}}; my %otherargs = @_; - my $create = $otherargs{'-create'}; #(scalar(@_) == 1 ? shift : 0); + my $create = 1; + if (exists($otherargs{'-create'}) && ($otherargs{'-create'}==0)) {$create = 0;} $self->{autocommit} = $otherargs{'-autocommit'}; unless (defined($self->{autocommit}))