[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [875] trunk/LedgerSMB.pm



Revision: 875
          http://svn.sourceforge.net/ledger-smb/?rev=875&view=rev
Author:   einhverfr
Date:     2007-03-09 16:41:53 -0800 (Fri, 09 Mar 2007)

Log Message:
-----------
Fixed LedgerSMB::Merge again

Modified Paths:
--------------
    trunk/LedgerSMB.pm

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2007-03-10 00:05:22 UTC (rev 874)
+++ trunk/LedgerSMB.pm	2007-03-10 00:41:53 UTC (rev 875)
@@ -3117,8 +3117,20 @@
 }
 
 sub merge {
-	my ($self, $src)  = @_;
-	for $arg (keys %$src){
+	my ($self, $src) = @_;
+	for my $arg ($self, $src){
+		shift;
+	}
+	my @keys;
+	if (scalar @keys){
+		@keys = @_;
+		print "Keys: ". scalar @keys . "\n";
+	}
+	else {
+		@keys = keys %{$src};
+		print "Keys: ". scalar @keys . "\n";
+	}
+	for my $arg (keys %$src){
 		$self->{$arg} = $src->{$arg};
 	}
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.