]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - tools/directive
Update copyright headers.
[user/henk/code/inspircd.git] / tools / directive
index 95fe847ac22cb65e67a9a0b68397dda0f3e86d4d..cdaf490beb112edcc0633e5bf3c8a22dda611590 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # InspIRCd -- Internet Relay Chat Daemon
 #
-#   Copyright (C) 2020 Sadie Powell <sadie@witchery.services>
+#   Copyright (C) 2020-2021 Sadie Powell <sadie@witchery.services>
 #
 # This file is part of InspIRCd.  InspIRCd is free software: you can
 # redistribute it and/or modify it under the terms of the GNU General Public
 #
 
 
-BEGIN {
-       require 5.10.0;
-       unless (-f 'configure') {
-               print "Error: $0 must be run from the main source directory!\n";
-               exit 1;
-       }
-}
-
-use feature ':5.10';
+use v5.10.0;
 use strict;
 use warnings FATAL => qw(all);
 
@@ -38,7 +30,7 @@ use make::console;
 use make::directive;
 
 if (scalar @ARGV < 2) {
-       print_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]\n", *STDERR;
+       say STDERR console_format "<|GREEN Usage:|> $0 <<|UNDERLINE FILE|>> [<|UNDERLINE DIRECTIVES...|>]";
        exit 1
 }
 
@@ -48,7 +40,7 @@ print_error "<|GREEN $file|> does not exist and/or is not a file!" unless -f $fi
 for my $directive (@ARGV) {
        my $value = get_directive $file, $directive, '';
        if (-t STDOUT) {
-               print_format "<|GREEN $directive|>: $value\n";
+               say console_format "<|GREEN $directive|>: $value";
        } else {
                say $value;
        }