lib/App/read_httpd_conf.pm
changeset 15 26b84b6da139
parent 12 cf75cb35c083
child 16 67d4ed376726
equal deleted inserted replaced
12:cf75cb35c083 15:26b84b6da139
    24         if (s{\\$}{}) {
    24         if (s{\\$}{}) {
    25             chomp;
    25             chomp;
    26             $_ .= <$fh>;
    26             $_ .= <$fh>;
    27             redo;
    27             redo;
    28         }
    28         }
    29         if (/^\s*include\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
    29         if (/^\s*include(?:optional)\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
    30             my $file = $+{file} =~ m{^/} ? $+{file} : "$basedir/$+{file}";
    30             my $file = $+{file} =~ m{^/} ? $+{file} : "$basedir/$+{file}";
    31             say "# $. $file INCLUDE $+{file}";
    31             say "# $. $file INCLUDE $+{file}";
    32             read_file($_, $basedir) foreach (glob -d $file ? "$file/*" : $file);
    32             read_file($_, $basedir) foreach (glob -d $file ? "$file/*" : $file);
    33             next;
    33             next;
    34         }
    34         }