summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LedgerSMB/DBObject.pm2
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;