I have a module I'm calling ZZZ that provides an Apache conf
directive, ZZZConf, which takes one argument - a file name.  This is
then given to an AppConfig object to read in the configuration file.
I am storing this in the $cfg object tied to the <Location> section
in which the directive appears.  

After reading in the configuration, I create an
HTML::Mason::ApacheHandler object and store it also in the $cfg
object.

Everything is fine and Dumping the $cfg object shows everything is
there (too much output to do so here).

When I send my first request and dump the $cfg object (returned by
Apache::ModuleConfig), I get the following:

Got something from ModuleConfig for ZZZ - ZZZ -> ZZZ=HASH(0x718900)
$VAR1 = bless( { 
         'config' => bless( { 
                      'FILE' => bless( { 
                                     'DEBUG' => 0,
                                     'PEDANTIC' => 1,
                                     'STATE' => bless( { 
                                                     'ALIAS' => {},
                                                     'CASE' => 0,
                                                     'ERROR' => '',
                                                     'GLOBAL' => { 
                                                               'ARGCOUNT' => 1,
                                                               'EXPAND' => 15,
                                                               'DEFAULT' => undef
                                                             },
                                                     'ARGS' => {},
                                                     'ALIASES' => {},
                                                     'EXPAND' => {},
                                                     'DEFAULT' => {},
                                                     'VARIABLE' => {},
                                                     'ACTION' => {},
                                                     'PEDANTIC' => 1,
                                                     'CREATE' => 0,
                                                     'ARGCOUNT' => {},
                                                     'EHANDLER' => sub { "DUMMY" },
                                                     'VALIDATE' => {}
                                                   }, 'AppConfig::State' )
                                   }, 'AppConfig::File' ),
                      'STATE' => $VAR1->{'config'}{'FILE'}{'STATE'}
                    }, 'AppConfig' ),
         'config_file' => 'conf/zzz.conf'
   }, 'ZZZ' );

Notice that there is no `ah' entry (in which I store the Mason
handler object) nor file-specific information in the AppConfig
object.  Also missing are two other hashes that are stored in this
object.

It looks like there might be another configuration going on, but I
can't find it -- by sprinkling warn statements throughout the code,
even in a DIR_CREATE and SERVER_CREATE functions, I can't find more
than one.  DIR_CREATE and SERVER_CREATE are each called once, and
DIR_CREATE's result is being passed to the configuration object --
just once.  No merging is being done - {DIR,SERVER}_MERGE do not
appear to be called (warn statements don't do anything).  The
following comes from server startup:

  Creating (dir) ZZZ object (ZZZ=HASH(0x72113c))
  Creating (server) ZZZ object (ZZZ=HASH(0x7210e8))
  Setting config for ZZZ=HASH(0x72113c) to AppConfig=HASH(0x72125c)
  Setting ah for ZZZ=HASH(0x72113c) to HTML::Mason::ApacheHandler=HASH(0x75c4e0)


Putting the above data (the ZZZ objects) in an array and storing the
index into the array in the $cfg object doesn't change the above
object, so it doesn't appear to be problems with storing the
configuration data.

Tieing the global array of ZZZ objects and watching the activity on
the array points to only one such object being configured once.

The most likely suspect that I can think of is the configuration
being done twice or incompletely the second time, but I don't know
where else to look.

Anyone have any suggestions?  I'll post the code if anyone thinks
they would like to take a look at it.

System:
  Apache/1.3.22 (Unix) mod_perl/1.26

  % perl -V
  Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
    Platform:
      osname=solaris, osvers=2.7, archname=sun4-solaris-multi
      uname='sunos hex.tamu.edu 5.7 generic_106541-15 sun4u sparc sunw,ultra-5_10 '
--
James Smith <[EMAIL PROTECTED]>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix

Reply via email to