$obj->{attibute} # instead of $obj->get_attribute(); #### package Foo; use Data::Dumper; my $o = new Bar; print $o->get_attribute(), $/; print $o->set_attribute('new val'), $/; print $o->set_flubber('dubber'), $/; print "Direct access, interpolated get flubber = $o->{flubber}\n"; print $o->no_exist(); print Dumper $o; package Bar; sub new{ return bless { attribute => 'value' }, shift } sub AUTOLOAD { my $self = shift; my ( $func ) = $AUTOLOAD =~ m/::([^:]+)$/; if ( $func =~ s/^set_// ) { return $self->{$func} = shift; } elsif ( $func =~ s/^get_// ) { return exists $self->{$func} ? $self->{$func} : undef; } else { my @caller = caller(); warn "Non existant function $func() called by:\n@caller\n"; return 0; } } sub DESTROY{}