Hi,

I have created my own configuration directives with Apache2::Module::add. How 
can I access the values from an PostConfig handler?

I have got it working with the main server. But if my directives are inside a 
VirtualHost they are not accessible.

sub set_fn {
  my($I, $parms, $arg)[EMAIL PROTECTED];
  local $_;

  Apache2::Module::get_config( __PACKAGE__, Apache2::ServerUtil->server )
      ->{"Directive"}=$arg;
}

sub postconfig {
  my($conf_pool, $log_pool, $temp_pool, $s) = @_;

  my $cfg=Apache2::Module::get_config( __PACKAGE__, 
                                       Apache2::ServerUtil->server );
  use Data::Dumper; warn "\npostconfig: ".Dumper( $cfg );

  return Apache2::Const::OK;
}

That works if "Directive" is placed outside a VirtualHost. Inside a 
VirtualHost the get_config in set_fn returns undef.

Torsten

Attachment: pgpPAJrRkG8xk.pgp
Description: PGP signature

Reply via email to