diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-22 15:14:55 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-22 15:14:55 +0000 |
commit | 37aa30e2a8219b52aae29ecb5db53ecd892b72b5 (patch) | |
tree | 41ab0fae50cbb83f16cb89e924829503b2c1ebfd /LedgerSMB | |
parent | 5f24c101474901bf5607fcad189d287b43c5d799 (diff) |
For now, allow both hashref and hash args to constructor
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1643 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/DBObject.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index 42f15736..c1d36d80 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -60,7 +60,7 @@ sub AUTOLOAD { sub new { my $class = shift @_; - my %args = @_; + my %args = (ref($_[0]) eq 'HASH')? %{$_[0]}: @_; my $base = $args{base}; my $mode = $args{copy}; my $self = bless {}, $class; |