summaryrefslogtreecommitdiff
path: root/lib/Apache/Config/Preproc/compact.pm
blob: b309be36a601bb929ca04c09caac4167bdcb87ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package Apache::Config::Preproc::compact;
use strict;
use warnings;
use Carp;

our $VERSION = '1.02';

sub new {
    croak "too many arguments" unless @_ == 2;
    bless {}, shift
}

sub expand {
    my ($self, $d, $repl) = @_;
    return $d->type eq 'blank' || $d->type eq 'comment';
}

1;

__END__

=head1 NAME    

Apache::Config::Preproc::compact - remove empty lines and comments

=head1 SYNOPSIS

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

=head1 DESCRIPTION

Removes empty and comment lines from the Apache configuration parse
tree.

=cut    

Return to:

Send suggestions and report system problems to the System administrator.