From: ivan Date: Mon, 5 Nov 2001 16:42:19 +0000 (+0000) Subject: AUTOLOAD optimizations broke things rather badly, oops X-Git-Tag: freeside_1_4_0pre11~228 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=dcdc515874c5db8e450550f41da21e9490709d5b AUTOLOAD optimizations broke things rather badly, oops --- diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 3c8e9bac6..9f3549468 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -384,7 +384,7 @@ $record->column('value') is a synonym for $record->set('column','value'); sub AUTOLOAD { my $field = $AUTOLOAD; $field =~ s/.*://; - if ( scalar(@_) == 2 ) { + if ( defined($_[1]) ) { $_[0]->setfield($field, $_[1]); } else { $_[0]->getfield($field); @@ -1036,12 +1036,12 @@ sub hfields { \%hash; } -#sub _dump { -# my($self)=@_; -# join("\n", map { -# "$_: ". $self->getfield($_). "|" -# } (fields($self->table)) ); -#} +sub _dump { + my($self)=@_; + join("\n", map { + "$_: ". $self->getfield($_). "|" + } (fields($self->table)) ); +} sub DESTROY { return; }