perl/modules/W3C/LogValidator/lib/W3C/LogValidator Config.pm,1.3,1.4

Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator
In directory hutz:/tmp/cvs-serv15772

Modified Files:
	Config.pm 
Log Message:
documenting API

Index: Config.pm
===================================================================
RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/Config.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Config.pm	10 Aug 2004 05:32:41 -0000	1.3
+++ Config.pm	11 Aug 2004 23:25:26 -0000	1.4
@@ -181,4 +181,86 @@
 	$self->config_default();	
 }
 
+package W3C::LogValidator::Config;
 1;
+
+__END__
+
+=head1 NAME
+
+W3C::LogValidator::Config - Configuration parsing for the Log Validator
+
+=head1 SYNOPSIS
+
+    use W3C::LogValidator::Config;
+    if ($config_filename)
+    { # parse configuration file and populate config hash
+        %config = W3C::LogValidator::Config->new($config_filename)->configure();
+    }
+    else
+    { # populate config hash with "default" values
+        %config = W3C::LogValidator::Config->new()->configure();
+    }
+
+=head1 DESCRIPTION
+
+C<W3C::LogValidator::Config> is the 
+
+=over 2
+
+=item $c = W3C::LogValidator::Config->new
+
+Constructs a new C<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")
+
+=back
+
+=over 4
+
+=item $c->configure
+
+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.
+
+=item $c->config_default
+
+Populates the configuration hash (which will then be returned by C<$c-E<gt>configure>) with reasonable default values
+
+=item $c->config_file
+
+Populates the configuration hash by parsing the configuration file given while constructing C<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 (F<samples/logprocess.conf>) 
+distributed with the module.
+
+=back
+
+=head1 BUGS
+
+Public bug-tracking interface at L<http://www.w3.org/Bugs/Public/>
+
+=head1 AUTHOR
+
+Olivier Thereaux <ot@w3.org> for The World Wide Web Consortium
+
+
+=head1 SEE ALSO
+
+perl(1).
+Up-to-date information on this tool at L<http://www.w3.org/QA/Tools/LogValidator/>
+
+=cut
+

Received on Wednesday, 11 August 2004 23:25:29 UTC