package Auto::Config_class; sub new { my $class = shift; my $fn = shift; my $this = { root => { local => 'c:/local', remote => 'docroot', }, }; bless $this, $class } sub get { my $this=shift; my $pri_key = shift; my $sec_key = shift; my $default = shift; exists $this->{$pri_key}{$sec_key} ? $this->{$pri_key}{$sec_key} : $default; } sub set { my $this=shift; my $pri_key = shift; my $sec_key = shift; my $value = shift; $this->{$prim_key}{$sec_key} = $value; } 1;