Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
Adding pod documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrubb committed Dec 24, 2003
1 parent 6f21345 commit cfe4626
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 26 deletions.
16 changes: 0 additions & 16 deletions README
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@
pod2text Config::ApacheExtended.pm > README

If this is still here it means the programmer was too lazy to create the readme file.

You can create it now by using the command shown above from this directory.

At the very least you should be able to use this set of instructions
to install the module...

perl Makefile.PL
make
make test
make install


If you are on a windows box you should use 'nmake' rather than 'make'.
4 changes: 2 additions & 2 deletions Todo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TODO list for Perl module Config::ApacheExtended
TODO list for Config::ApacheExtended

- Add valid_{blocks,directives} support
- rework the grammar file, to move some of the validation/substitution features into actions in the grammar
89 changes: 81 additions & 8 deletions lib/Config/ApacheExtended.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use Scalar::Util qw(weaken);
use Text::Balanced qw(extract_variable);
use File::Spec::Functions qw(splitpath catpath abs2rel rel2abs file_name_is_absolute);
use Carp qw(croak cluck);

use strict;
BEGIN {
use vars qw ($VERSION $DEBUG);
Expand All @@ -27,21 +26,95 @@ Config::ApacheExtended -
=head1 SYNOPSIS
use Config::ApacheExtended
blah blah blah
=for example begin
use Config::ApacheExtended
my $conf = Config::ApacheExtended->new(source => "t/parse.conf");
$conf->parse() or die "Unsuccessful Parsing of config file";
# Print out all the Directives
foreach ($conf->get())
{
print "$_ => " . $conf->get($_) . "\n";
}
# Show all the blocks at the root
foreach ($conf->block())
{
foreach ($conf->block($_))
{
print $_->[0] . " => " . $_->[1] . "\n";
foreach ($conf->block(@$_))
{
my $block = $_;
foreach ($block->get())
{
print "$_ => " . $block->get($_) . "\n";
}
}
}
}
=for example end
=head1 DESCRIPTION
Stub documentation for this module was created by ExtUtils::ModuleMaker.
It looks like the author of the extension was negligent enough
to leave the stub unedited.
This module is used to parse a configuration file similar to that of the
Apache webserver (see http://httpd.apache.org for more details). This module
provides several extensions to that syntax, namely variable substitution and
Hereto documents. Other features include, value inheritance, directive and
block validation, and include support. This module also handles quoted strings
and split lines properly.
=head1 METHODS
new( opt => "value" )
Constructs a new Config::ApacheExtended object.
Options are:
=over 4
=item source
The relative or absolute path to the configuration file.
If a relative path is given, it is resolved using File::Spec::rel2abs
=item expand_vars
Turn on variable expansion support. (See L<Config::ApacheExtended/"VARIABLE SUBSTITUTION">)
Defaults to OFF.
=item conf_root
The directory to use as the base for relative path resolutions (i.e. for include statements)
Blah blah blah.
=item root_directive
If this option is set then it will be used as conf_root.
This is handy if parsing an apache config file set it to "ServerRoot".
=head1 USAGE
=item honor_include
Set this option to false to turn off include support.
Defaults to ON.
=item inherit_vals
If this option is set value inheritance will be enabled.
Defaults to OFF.
=item ignore_case
If this option is turned off then directives and block names are case sensitive.
Defaults to ON.
=back
_die_on_nokey => 0,
_die_on_noblock => 0,
_valid_directives => undef,
_valid_blocks => undef,
_source => undef,
=head1 BUGS
Expand Down

0 comments on commit cfe4626

Please sign in to comment.