[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [874] trunk
- Subject: SF.net SVN: ledger-smb: [874] trunk
- From: ..hidden..
- Date: Fri, 09 Mar 2007 16:05:22 -0800
Revision: 874
http://svn.sourceforge.net/ledger-smb/?rev=874&view=rev
Author: einhverfr
Date: 2007-03-09 16:05:22 -0800 (Fri, 09 Mar 2007)
Log Message:
-----------
Fixing LedgerSMB::Merge()
Modified Paths:
--------------
trunk/LedgerSMB/DBObject.pm
trunk/LedgerSMB.pm
Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm 2007-03-09 23:51:27 UTC (rev 873)
+++ trunk/LedgerSMB/DBObject.pm 2007-03-10 00:05:22 UTC (rev 874)
@@ -32,12 +32,13 @@
our @ISA = qw(LedgerSMB);
sub new {
+ my $self = shift @_;
my $lsmb = shift @_;
- my $self = {};
if (! $lsmb->isa('LedgerSMB')){
$self->error("Constructor called without LedgerSMB object arg");
}
+ $self = {};
my $attr;
for $attr (keys %{$lsmb}){
$self->{$attr} = $lsmb->{$attr};
@@ -60,8 +61,6 @@
my $args = $ref->{proargnames};
$args =~ s/\{(.*)\}/$1/;
my @proc_args = split /,/, $args;
- print "Ref: $ref\n";
- print "Args: $ref->{proargnames}\n";
if (!$ref){ # no such function
$self->error("No such function: ", $funcname);
@@ -73,7 +72,6 @@
if ($args){
for my $arg (@proc_args){
if ($arg =~ s/^in_//){
- print "Arg: $arg\n";
push @call_args, $self->{$arg};
}
}
@@ -81,7 +79,6 @@
else {
@call_args = @_;
}
- print "Arg2s: @_ \n";
$self->callproc($funcname, @call_args);
}
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2007-03-09 23:51:27 UTC (rev 873)
+++ trunk/LedgerSMB.pm 2007-03-10 00:05:22 UTC (rev 874)
@@ -525,9 +525,6 @@
}
sub callproc {
- for my $arg (@_){
- print "Callproc arg: $arg\n";
- }
my $self = shift @_;
my $procname = shift @_;
my $argstr = "";
@@ -3120,9 +3117,8 @@
}
sub merge {
- my $self = shift @_;
- my $src = shift @_;
- for $arg (@_){
+ my ($self, $src) = @_;
+ for $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.