1 package OpenILS::Application::AuthProxy::AuthBase;
5 use OpenSRF::Utils::Logger qw(:logger);
8 my( $class, $args ) = @_;
9 $class = ref $class || $class;
10 return bless($args, $class);
13 # --------------------------------------------------------------------------
14 # Add automatic getter/setter methods
15 # --------------------------------------------------------------------------
16 my @AUTOLOAD_FIELDS = qw/
23 my $type = ref($self) or die "$self is not an object";
28 # return immediately if called as the DESTROY method
29 return if $name eq 'DESTROY';
31 unless (grep { $_ eq $name } @AUTOLOAD_FIELDS) {
32 $logger->error("$type: invalid autoload field: $name");
33 die "$type: invalid autoload field: $name\n"
38 *{"${type}::${name}"} = sub {
41 $s->{$name} = $v if defined $v;
45 return $self->$name($data);