# Usage: my $logfile = $handler->conf( 'LogFile' ); # return value # or: $handler->conf( 'LogFile' => $myLogfile ); # set value sub conf { my ( $self, $option, @params ) = @_; if ( scalar @params ) { # if parameter submitted, set it $self->{CONFIG}->{$option} = $params[0]; } # if unless ( exists $self->{CONFIG}->{$option} ) { Carp::croak "Error: \$handler->conf($option) not existing"; } # unless return $self->{CONFIG}->{$option}; } # conf