Apache::ConfigFile

Parse an Apache style httpd.conf configuration file
Download

Apache::ConfigFile Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Nate Wiger
  • Publisher web site:
  • http://search.cpan.org/~nwiger/

Apache::ConfigFile Tags


Apache::ConfigFile Description

Parse an Apache style httpd.conf configuration file Apache::ConfigFile is a Perl module that parses the Apache httpd.conf, or any compatible config file, and provides methods for you to access the values from the config file. The above examples show basic usage of this module, which boils down to reading a given config file and then using the cmd_config() and cmd_context() functions to access its information.By default, the config file is parsed more or less "verbatim", meaning that directives are case-sensitive, variables are not interpolated, and so forth. These features can be changed by options given to the read() function (see below).The read() function is the constructor, which reads in a configuration file and returns an object with methods that can be used to access directives from the file. The simplest usage is something like this: use Apache::ConfigFile; my $ac = Apache::ConfigFile->read("/path/to/httpd.conf");Which would parse the Apache httpd.conf file and give you back an $ac object with the following methods:cmd_config() Used to access individual configuration commandscmd_context() Used to change the context of the commands you're accessingdir_config() Used to access values set via the PerlSetVar command (like mod_perl) Requirements: · Perl


Apache::ConfigFile Related Software