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

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



Revision: 862
          http://svn.sourceforge.net/ledger-smb/?rev=862&view=rev
Author:   einhverfr
Date:     2007-03-07 23:07:47 -0800 (Wed, 07 Mar 2007)

Log Message:
-----------
refactoring some methods and getting rid of unnecessary multiple inheritance

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

Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm	2007-03-08 03:22:22 UTC (rev 861)
+++ trunk/LedgerSMB/DBObject.pm	2007-03-08 07:07:47 UTC (rev 862)
@@ -10,7 +10,10 @@
 
 =item find_method ($hashref, $function_name, @args)
 
+=item merge ($hashref, @attrs)
+copies @attrs from $hashref to $self.
 
+
 =head1 Copyright (C) 2007, The LedgerSMB core team.
 This file is licensed under the Gnu General Public License version 2, or at your
 option any later version.  A copy of the license should have been included with
@@ -63,3 +66,5 @@
 	}
 	$self->callproc($funcname, @proc_args);
 }
+
+

Modified: trunk/LedgerSMB/Employee.pm
===================================================================
--- trunk/LedgerSMB/Employee.pm	2007-03-08 03:22:22 UTC (rev 861)
+++ trunk/LedgerSMB/Employee.pm	2007-03-08 07:07:47 UTC (rev 862)
@@ -11,9 +11,6 @@
 The following method is static:
 =item new ($LedgerSMB object);
 
-=item merge ($hashref, @attrs)
-copies @attrs from $hashref to $self.
-
 The following methods are passed through to stored procedures via Autoload.
 =item save
 =item get
@@ -34,7 +31,7 @@
 package LedgerSMB::Employee;
 use LedgerSMB;
 use LedgerSMB::DBObject;
..hidden.. = (LedgerSMB, LedgerSMB::DBObject);
..hidden.. = (LedgerSMB::DBObject);
 
 sub AUTOLOAD {
 	my $procname = "employee_$LedgerSMB::Employee::Autoload";
@@ -53,14 +50,6 @@
 }
 
 
-sub merge {
-	my $self = shift @_;
-	my $src = shift @_;
-	for $arg (@_){
-		$self->{$arg} = $src->{$arg};
-	}
-}
-
 sub save {
 	my $hashref = shift ($self->exec_method("employee_save"));
 	$self->merge($hashref, 'id');


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