Greetengs, all.

I'm trying to use configuration directives via Apache2::Module. It works fine until the first module reload (performed by Apache2::Reload). After that it can't read config anymore. Until I restart apache.
Here is the related code:
package dir_browse::dir_browse; use Apache2::Module; ... Apache2::Module::add(__PACKAGE__, [{name => 'START_DIR'}]); ... sub handler : method { my ($self, $r) = @_; ... my $cfg = Apache2::Module::get_config(__PACKAGE__, $r->server, $r->p +er_dir_config) or throw Error; $self->{START_DIR} = $cfg->{ST_DIR}; ... } sub START_DIR { my ($cfg, $parms, $arg1) = @_; $cfg->{ST_DIR} = $arg1; }
And the httpd.conf:
PerlModule Apache2::Reload PerlInitHandler Apache2::Reload ... PerlLoadModule dir_browse::dir_browse <Location /dir_browse> SetHandler perl-script PerlResponseHandler dir_browse::dir_browse PJX_JSDEBUG 2 PJX_DEBUG 1 START_DIR "C:\MP3" </Location>
What am I doing wrong? Or how do I get config reread on each reload?

Thanx,
Artem.

In reply to Apache2::Module question by artemave

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.