summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-10 00:05:22 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-10 00:05:22 +0000
commita2bfc9671736d88f3e4603eeb0a97d2425cb3584 (patch)
treec8c18daf2ae991a57dfa1eae2b2ac362f13b3ffe
parent006b909f167653228b41c4725d2b55e9b1860097 (diff)
Fixing LedgerSMB::Merge()
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@874 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB.pm8
-rw-r--r--LedgerSMB/DBObject.pm7
2 files changed, 4 insertions, 11 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index f1698664..d547ea51 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -525,9 +525,6 @@ sub round_amount {
}
sub callproc {
- for my $arg (@_){
- print "Callproc arg: $arg\n";
- }
my $self = shift @_;
my $procname = shift @_;
my $argstr = "";
@@ -3120,9 +3117,8 @@ sub audittrail {
}
sub merge {
- my $self = shift @_;
- my $src = shift @_;
- for $arg (@_){
+ my ($self, $src) = @_;
+ for $arg (keys %$src){
$self->{$arg} = $src->{$arg};
}
}
diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm
index 54b34429..d91c4899 100644
--- a/LedgerSMB/DBObject.pm
+++ b/LedgerSMB/DBObject.pm
@@ -32,12 +32,13 @@ use warnings;
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 @@ sub exec_method {
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 @@ sub exec_method {
if ($args){
for my $arg (@proc_args){
if ($arg =~ s/^in_//){
- print "Arg: $arg\n";
push @call_args, $self->{$arg};
}
}
@@ -81,7 +79,6 @@ sub exec_method {
else {
@call_args = @_;
}
- print "Arg2s: @_ \n";
$self->callproc($funcname, @call_args);
}