The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Apache::Config::Preproc::locus - attach file location to each parse node

SYNOPSIS

    $x = new Apache::Config::Preproc '/path/to/httpd.conf',
                -expand => [ qw(locus) ];

    foreach ($x->select) {
        print $_->locus
    }

DESCRIPTION

Locus attaches to each node in the parse tree a Text::Locus object which describes the location of the corresponding statement in the source file. The location of a node can be accessed via the locus method as illustrated in the synopsis.

Technically speaking, this module replaces each instance of Apache::Admin::Config::Tree in the parse tree with an instance of its derived class Apache::Config::Preproc::locus::node, which provides the locus accessor.

SEE ALSO

Apache::Config::Preproc

Text::Locus