From 8af0c5a7d5b6b6720ac12251f50897f6ee3f1b63 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 9 Mar 2007 23:44:20 +0000 Subject: Employee.pm is now working as advertised git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@872 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB.pm | 3 +++ LedgerSMB/DBObject.pm | 7 ++++--- LedgerSMB/Employee.pm | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LedgerSMB.pm b/LedgerSMB.pm index eb7cca38..f1698664 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -525,6 +525,9 @@ sub round_amount { } sub callproc { + for my $arg (@_){ + print "Callproc arg: $arg\n"; + } my $self = shift @_; my $procname = shift @_; my $argstr = ""; diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index beb95fb2..54b34429 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -68,20 +68,21 @@ sub exec_method { die; } my $m_name = $ref->{proname}; + my @call_args; if ($args){ for my $arg (@proc_args){ if ($arg =~ s/^in_//){ print "Arg: $arg\n"; - push @proc_args, $self->{$arg}; + push @call_args, $self->{$arg}; } } } else { - @proc_args = @_; + @call_args = @_; } print "Arg2s: @_ \n"; - $self->callproc($funcname, @proc_args); + $self->callproc($funcname, @call_args); } 1; diff --git a/LedgerSMB/Employee.pm b/LedgerSMB/Employee.pm index 9ddbbc8f..0aa94961 100644 --- a/LedgerSMB/Employee.pm +++ b/LedgerSMB/Employee.pm @@ -35,10 +35,10 @@ our $VERSION = '1.0.0'; our @ISA = qw(LedgerSMB::DBObject); - sub AUTOLOAD { my $self = shift; - my $procname = "employee_$LedgerSMB::Employee::Autoload"; + $AUTOLOAD =~ s/^.*:://; + my $procname = "employee_$AUTOLOAD"; $self->exec_method($procname, @_); } -- cgit v1.2.3