commit:     1ec271c4d8441d1521bbc0332224286caeda77ea
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Fri Jan  9 03:28:47 2026 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Fri Jan  9 03:28:47 2026 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=1ec271c4

Restructure the show_usage() subroutine slightly

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 locale-gen | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/locale-gen b/locale-gen
index 6279541..0e68f32 100644
--- a/locale-gen
+++ b/locale-gen
@@ -235,14 +235,15 @@ sub show_usage (@options) {
        my $pipe;
        if (! open $pipe, "| column -t -s \037") {
                exit 1;
+       } else {
+               for my $row (@options) {
+                       my ($spec, $description) = $row->@*;
+                       my ($long, $short) = split /[|=]/, $spec;
+                       printf {$pipe} "-%s, --%s\037%s\n", $short, $long, 
$description;
+               }
+               close $pipe;
+               print "\nSee also: locale-gen(8), locale.gen(5)\n";
        }
-       for my $row (@options) {
-               my ($spec, $description) = $row->@*;
-               my ($long, $short) = split /[|=]/, $spec;
-               printf {$pipe} "-%s, --%s\037%s\n", $short, $long, $description;
-       }
-       close $pipe;
-       print "\nSee also: locale-gen(8), locale.gen(5)\n";
 }
 
 sub show_version () {

Reply via email to