From 5221eadfdb1a8faa0b46e8a8577876fb8d67fb37 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 29 Dec 2013 18:23:02 -0800 Subject: [PATCH] still report errant AUTOLOAD triggering in the new world of FKs, RT#13971 --- FS/FS/Record.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 835b73d8f..39a392013 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -979,6 +979,9 @@ sub AUTOLOAD { my($field)=$AUTOLOAD; $field =~ s/.*://; + confess "errant AUTOLOAD $field for $self (arg $value)" + unless blessed($self) && $self->can('setfield'); + #$fk_method_cache{$self->table} ||= fk_methods($self->table); if ( exists($fk_method_cache{$self->table}->{$field}) ) { @@ -1006,12 +1009,8 @@ sub AUTOLOAD { } if ( defined($value) ) { - confess "errant AUTOLOAD $field for $self (arg $value)" - unless blessed($self) && $self->can('setfield'); $self->setfield($field,$value); } else { - confess "errant AUTOLOAD $field for $self (no args)" - unless blessed($self) && $self->can('getfield'); $self->getfield($field); } } -- 2.11.0