package myObj; sub new { my $class=shift; my $conf=shift; my @rest=@_; return undef unless($conf); # weitere Tests der Parameter ... my $self={CONF=>$conf, rest=>\@rest}; return bless($self,$class); } sub conf { return $_[0]->{CONF}; } sub tue_was { my $self=shift; if( $self->conf->has('irgendwas') ) { return 'Ich tue was'; } else { return 'Ich tue nichts'; } }