From 63e756c1a852fe8e17a7cacc403d8cea340779e5 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 5 Oct 2022 22:48:04 -0500 Subject: [PATCH] Reorganize gatekeeper script to sort subs ahead of their callers Prior to committing, this was validated with: (DIFF='git diff --cached'; comm -3 <($DIFF | grep ^- | sed -e 's/^-//' | sort) \ <($DIFF | grep ^+ | sed -e 's/^+//' | sort) ) The output shows only blank lines, comments, and a diff header were added, and only a diff header removed, after all lines are sorted and paired for analysis. To replicate, change the "git diff" command to compare this commit with its parent. --- gatekeeper.pl | 973 ++++++++++++++++++++++++++------------------------ 1 file changed, 509 insertions(+), 464 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index debcf63..c824519 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -97,6 +97,11 @@ # Imported into Git by Jacob Bachmeyer (jcb@gnu.org), July 2020 # Further changes are tracked in Git. + +# +# - Initialization and preliminaries +# + use strict; use warnings; @@ -193,6 +198,38 @@ our $style; our $help; our $version; +sub usage_information { + my $retval = "\n$NAME protocol v$VERSION ($DATE)\n"; + $retval .= "More information at $URL\n"; + $retval .= "\nERROR: You have not supplied all required parameters. $NAME takes these arguments:\n\n"; + $retval .= " $NAME -s