diff options
-rwxr-xr-x | LedgerSMB.pm | 8 | ||||
-rw-r--r-- | LedgerSMB/DBObject.pm | 7 |
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); } |