AUTOLOAD { # magic.. use vars; no strict 'refs'; our $AUTOLOAD; local $key = $AUTOLOAD; $key =~ s/.*:://; croak "No such entry $key" unless exists $Defaults->{$key}; *$AUTOLOAD = sub { my $self = shift; $self->{$key} = shift # $key is not defined at the time this sub is being called, only when its defined if @_; $self->{$key} }; goto &$AUTOLOAD; }