From 5f24c101474901bf5607fcad189d287b43c5d799 Mon Sep 17 00:00:00 2001 From: aurynn_cmd Date: Thu, 20 Sep 2007 20:06:53 +0000 Subject: Removal of extra new_user function from admin.pl. Updates to DBObject.pm to remove treatment of argument list as a hashref. Update to LedgerSMB.pm to add s bare sub DESTROY so as not to trigger weird behaviour from using AUTOLOAD. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1636 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index 097b85dc..42f15736 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -60,13 +60,13 @@ sub AUTOLOAD { sub new { my $class = shift @_; - my $args = shift @_; - my $base = $args->{base}; - my $mode = $args->{copy}; + my %args = @_; + my $base = $args{base}; + my $mode = $args{copy}; my $self = bless {}, $class; my @mergelist; - if (defined $args->{merge}){ - @mergelist = @{$args->{merge}}; + if ( defined $args{merge} ){ + @mergelist = @{ $args{merge} }; } elsif (defined $mode && ( $mode eq 'list')) { $self->error('Mergelist not set'); } @@ -289,6 +289,7 @@ sub set { $self->{$arg} = $args{$arg}; } return 1; + } 1; -- cgit v1.2.3