--- a/lib/App/read_httpd_conf.pm Mon Jan 12 15:03:30 2015 +0100
+++ b/lib/App/read_httpd_conf.pm Mon Jan 12 15:08:08 2015 +0100
@@ -27,7 +27,7 @@
$_ .= <$fh>;
redo;
}
- if (/^\s*include(?:optional)\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
+ if (/^\s*include(?:optional)?\s+(?<quote>["'])?(?<file>.*?)\k<quote>?\s*$/i) {
my $include_file = substr($+{file}, 0, 1) eq '/' ? $+{file} : "$basedir/$+{file}";
say "# $. $file INCLUDE $include_file";
read_file($_, $basedir) foreach (glob -d $include_file ? "$include_file/*" : $include_file);