summaryrefslogtreecommitdiffabout
path: root/lib/Apache/Config/Preproc/compact.pm
blob: 22fccc7354d151d21848bf222cfdce49a37949f9 (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
package Apache::Config::Preproc::compact;
use strict;
use warnings;
use Carp;

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.