lib/App/read_httpd_conf.pm
changeset 13 bbb0dea458c3
parent 12 cf75cb35c083
child 14 ee11abdf5324
equal deleted inserted replaced
12:cf75cb35c083 13:bbb0dea458c3
    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\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
    30             my $file = $+{file} =~ m{^/} ? $+{file} : "$basedir/$+{file}";
    30             my $file = substr($+{file}, 0, 1) eq '/'  ? $+{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         }
    35 
    35