From 70686e8d2b400a804277ba0cdc664e71dd393dd5 Mon Sep 17 00:00:00 2001 From: Nikolai Kondrashov Date: Fri, 5 Dec 2014 12:12:19 +0200 Subject: [PATCH 1/3] rad_counter: Use heredoc for help message 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 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/modules/rlm_counter/rad_counter b/src/modules/rlm_counter/rad_counter index be0a33a..b6c1159 100755 --- a/src/modules/rlm_counter/rad_counter +++ b/src/modules/rlm_counter/rad_counter @@ -19,15 +19,18 @@ my $help = 0; $filename = ''; sub show_help { - print "Usage: $0 --file= [--reset=] [--match=]\n"; - print "[--user=] [--help] [--hours|--minutes|--seconds]\n\n"; - print "--user=", "\t\t", "Information for specific user\n"; - print "--file=", "\t\t", "Counter db filename\n"; - print "--match=", "\t\t", "Information for matching users\n"; - print "--reset=", "\t\t", "Reset counter to .\n"; - print "\t\t\t\t", "If divisor is set use it, else 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= [--reset=] [--match=] +[--user=] [--help] [--hours|--minutes|--seconds] + +--user= Information for specific user +--file= Counter db filename +--match= Information for matching users +--reset= Reset counter to . + If divisor is set use it, else means seconds +--help Show this help screen +--(hours|minutes|seconds) Specify information divisor +EOF exit 0; } -- 2.1.3