From 37aa30e2a8219b52aae29ecb5db53ecd892b72b5 Mon Sep 17 00:00:00 2001 From: tetragon Date: Sat, 22 Sep 2007 15:14:55 +0000 Subject: 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 --- LedgerSMB/DBObject.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LedgerSMB/DBObject.pm') 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; -- cgit v1.2.3