summaryrefslogtreecommitdiff
path: root/lib/Apache/Config/Preproc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2020-01-18 10:17:08 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2020-01-18 10:17:08 +0200
commit55c8823f50ef9da3c125bceb9508c8a9291acdc2 (patch)
tree9091d4d3d19555e90ac74528bdfb06194a5e2b1f /lib/Apache/Config/Preproc
parent7ead7f677303da8583529265f3b2121fba40d66c (diff)
downloadacpp-55c8823f50ef9da3c125bceb9508c8a9291acdc2.tar.gz
acpp-55c8823f50ef9da3c125bceb9508c8a9291acdc2.tar.bz2
Document the locus expansion module
Diffstat (limited to 'lib/Apache/Config/Preproc')
-rw-r--r--lib/Apache/Config/Preproc/compact.pm4
-rw-r--r--lib/Apache/Config/Preproc/ifdefine.pm7
-rw-r--r--lib/Apache/Config/Preproc/ifmodule.pm4
-rw-r--r--lib/Apache/Config/Preproc/include.pm5
-rw-r--r--lib/Apache/Config/Preproc/locus.pm39
-rw-r--r--lib/Apache/Config/Preproc/macro.pm5
6 files changed, 60 insertions, 4 deletions
diff --git a/lib/Apache/Config/Preproc/compact.pm b/lib/Apache/Config/Preproc/compact.pm
index 06df4b6..b2cc2a7 100644
--- a/lib/Apache/Config/Preproc/compact.pm
+++ b/lib/Apache/Config/Preproc/compact.pm
@@ -29,4 +29,8 @@ Apache::Config::Preproc::compact - remove empty lines and comments
Removes empty and comment lines from the Apache configuration parse
tree.
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
=cut
diff --git a/lib/Apache/Config/Preproc/ifdefine.pm b/lib/Apache/Config/Preproc/ifdefine.pm
index ddfae3d..3ca925b 100644
--- a/lib/Apache/Config/Preproc/ifdefine.pm
+++ b/lib/Apache/Config/Preproc/ifdefine.pm
@@ -136,4 +136,9 @@ B<E<lt>IfDefineE<gt>> statements in the Apache configuration parse
tree. Optional arguments to the constructor are treated as the names
of symbols to define (similar to the B<httpd> B<-D> options).
-
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
+=cut
+
diff --git a/lib/Apache/Config/Preproc/ifmodule.pm b/lib/Apache/Config/Preproc/ifmodule.pm
index 96e2db8..f96f04b 100644
--- a/lib/Apache/Config/Preproc/ifmodule.pm
+++ b/lib/Apache/Config/Preproc/ifmodule.pm
@@ -266,5 +266,9 @@ is a shorthand for
=back
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
=cut
diff --git a/lib/Apache/Config/Preproc/include.pm b/lib/Apache/Config/Preproc/include.pm
index 8c9a604..aa818fb 100644
--- a/lib/Apache/Config/Preproc/include.pm
+++ b/lib/Apache/Config/Preproc/include.pm
@@ -212,6 +212,11 @@ is a shorthand for
When the B<ServerRoot> statement is seen, its value overwrites any
previously set server root directory.
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
=cut
+
diff --git a/lib/Apache/Config/Preproc/locus.pm b/lib/Apache/Config/Preproc/locus.pm
index 4db0d02..9aa3989 100644
--- a/lib/Apache/Config/Preproc/locus.pm
+++ b/lib/Apache/Config/Preproc/locus.pm
@@ -111,15 +111,13 @@ use Apache::Admin::Config;
our @ISA = qw(Apache::Admin::Config::Tree);
sub derive {
- my ($class, $orig, $locus, $index) = @_;
+ my ($class, $orig, $locus) = @_;
my $self = bless $orig->clone;
$self->{_locus} = $locus;
- $self->{_index} = $index;
return $self;
}
sub locus { shift->{_locus} }
-sub index { shift->{_index} }
sub clone {
my ($self) = @_;
@@ -129,7 +127,42 @@ sub clone {
}
1;
+__END__
+=head1 NAME
+
+Apache::Config::Preproc::locus - attach file location to each parse node
+
+=head1 SYNOPSIS
+
+ $x = new Apache::Config::Preproc '/path/to/httpd.conf',
+ -expand => [ qw(locus) ];
+
+ foreach ($x->select) {
+ print $_->locus
+ }
+
+=head1 DESCRIPTION
+
+B<Locus> attaches to each node in the parse tree a B<Text::Locus> object
+which describes the location of the corresponding statement in the source
+file. The location for each node can be accessed via the B<locus> method
+as illustrated in the synopsis.
+
+Technically speaking, this module replaces each instance of
+B<Apache::Admin::Config::Tree> in the parse tree with an instance of its
+derived class B<Apache::Config::Preproc::locus::node>, which provides the
+B<locus> accessor.
+
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
+L<Text::Locus>
+
+=cut
+
+
diff --git a/lib/Apache/Config/Preproc/macro.pm b/lib/Apache/Config/Preproc/macro.pm
index 712043d..43714a8 100644
--- a/lib/Apache/Config/Preproc/macro.pm
+++ b/lib/Apache/Config/Preproc/macro.pm
@@ -147,4 +147,9 @@ convenient when a single macro name is to be retained.
=back
+=head1 SEE ALSO
+
+L<Apache::Config::Preproc>
+
=cut
+

Return to:

Send suggestions and report system problems to the System administrator.