X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Fconfigure.pm;h=dfdbf5f75d680b7ab8e0669b154b8fd60849f588;hb=02497bfa999da26c19a92d8620c35bb97f1da711;hp=48bd8db3842a445d352f79a7236f240261a11c74;hpb=9207f3f1ce0f1c7d7dc9af522e063017d38f7b5f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/configure.pm b/make/configure.pm index 48bd8db38..dfdbf5f75 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -208,9 +208,9 @@ sub test_file($$;$) { sub test_header($$;$) { my ($compiler, $header, $args) = @_; $args //= ''; - open(COMPILER, "| $compiler -E - $args ${\CONFIGURE_ERROR_PIPE}") or return 0; - print COMPILER "#include <$header>"; - close(COMPILER); + open(my $fh, "| $compiler -E - $args ${\CONFIGURE_ERROR_PIPE}") or return 0; + print $fh "#include <$header>"; + close $fh; return !$?; } @@ -257,11 +257,11 @@ sub parse_templates($$$) { # Iterate through files in make/template. foreach () { print_format "Parsing <|GREEN $_|> ...\n"; - open(TEMPLATE, $_) or print_error "unable to read $_: $!"; - my (@lines, $mode, @platforms, %targets); + open(my $fh, $_) or print_error "unable to read $_: $!"; + my (@lines, $mode, @platforms, @targets); # First pass: parse template variables and directives. - while (my $line =