lib/App/read_httpd_conf.pm
changeset 18 eb152cd8d2bc
parent 17 1b278fa8b05f
equal deleted inserted replaced
17:1b278fa8b05f 18:eb152cd8d2bc
    25         if (s{\\$}{}) {
    25         if (s{\\$}{}) {
    26             chomp;
    26             chomp;
    27             $_ .= <$fh>;
    27             $_ .= <$fh>;
    28             redo;
    28             redo;
    29         }
    29         }
    30         if (/^\s*include(?:optional)\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
    30         if (/^\s*include(?:optional)?\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
    31             my $include_file = substr($+{file}, 0, 1) eq '/'  ? $+{file} : "$basedir/$+{file}";
    31             my $include_file = substr($+{file}, 0, 1) eq '/'  ? $+{file} : "$basedir/$+{file}";
    32             say "# $. $file INCLUDE $include_file";
    32             say "# $. $file INCLUDE $include_file";
    33             read_file($_, $basedir) foreach (glob -d $include_file ? "$include_file/*" : $include_file);
    33             read_file($_, $basedir) foreach (glob -d $include_file ? "$include_file/*" : $include_file);
    34             next;
    34             next;
    35         }
    35         }