Olivier Thereaux
and 1 contributors


W3C::LogValidator::Config - [W3C Log Validator] Configuration parser


    use W3C::LogValidator::Config;
    if ($config_filename)
    { # parse configuration file and populate config hash
        %config = W3C::LogValidator::Config->new($config_filename)->configure();
    { # populate config hash with "default" values
        %config = W3C::LogValidator::Config->new()->configure();


W3C::LogValidator::Config parses configuration files or directives for the Log Validator



$c = W3C::LogValidator::Config->new

Constructs a new W3C::LogValidator::Config configuration processor. A file name may be passed as a variable, as follows:

  $c = W3C::LogValidator::Config->new("path/to/file.conf")

General methods


Returns a hash containing configuration variables for the main module and for each processing module.

Hash structure as follows: $conf{LogProcessor} is a hash containing configuration info for the main Log Validator process e.g :

    $conf{LogProcessor}{MaxInvalid} is an int with the general setting for MaxInvalid, 
    $conf{LogProcessor}{UseValidationModule} is an array with all processing modules used

for each processing module, $conf{ProcessingModuleX} is a hash containing configuration info specific to that processing module. Typically this is used to override general setting.


Populates the configuration hash (which will then be returned by $c->configure) with reasonable default values


Populates the configuration hash by parsing the configuration file given while constructing W3C::LogValidator::Config Does not work if that parameter was not passed during construction

The configuration file uses a syntax very similar to the one used by the Apache Web server. Both syntax and vocabulary are documented in the sample configuration file (samples/logprocess.conf) distributed with the module.


Public bug-tracking interface at http://www.w3.org/Bugs/Public/


Olivier Thereaux <ot@w3.org> for The World Wide Web Consortium


perl(1). Up-to-date information on this tool at http://www.w3.org/QA/Tools/LogValidator/