rad_counter: Use heredoc for help message
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Fri, 5 Dec 2014 10:12:19 +0000 (12:12 +0200)
committerNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Fri, 5 Dec 2014 13:46:54 +0000 (15:46 +0200)
Use Perl's here document syntax for rad_counter's help message and
replace tab escape sequences with spaces to make the source more
readable and easier to modify.

src/modules/rlm_counter/rad_counter

index be0a33a..b6c1159 100755 (executable)
@@ -19,15 +19,18 @@ my $help = 0;
 $filename = '';
 
 sub show_help {
-    print "Usage: $0 --file=<counter filename> [--reset=<seconds>] [--match=<regexp>]\n";
-    print "[--user=<username>] [--help] [--hours|--minutes|--seconds]\n\n";
-    print "--user=<username>", "\t\t", "Information for specific user\n";
-    print "--file=<filename>", "\t\t", "Counter db filename\n";
-    print "--match=<regexp>", "\t\t", "Information for matching users\n";
-    print "--reset=<number>", "\t\t", "Reset counter to <number>.\n";
-    print "\t\t\t\t", "If divisor is set use it, else <number> means seconds\n";
-    print "--help", "\t\t\t\t", "Show this help screen\n";
-    print "--(hours|minutes|seconds)", "\t", "Specify information divisor\n";
+    print <<"EOF";
+Usage: $0 --file=<counter filename> [--reset=<seconds>] [--match=<regexp>]
+[--user=<username>] [--help] [--hours|--minutes|--seconds]
+
+--user=<username>               Information for specific user
+--file=<filename>               Counter db filename
+--match=<regexp>                Information for matching users
+--reset=<number>                Reset counter to <number>.
+                                If divisor is set use it, else <number> means seconds
+--help                          Show this help screen
+--(hours|minutes|seconds)       Specify information divisor
+EOF
     exit 0;
 }