gbranden pushed a commit to branch master
in repository groff.

commit 7daee5f2e06942685aac6ce83fe17da47f1a83b0
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Aug 2 07:55:22 2025 -0500

    [grog]: Fix code style nit.
    
    * src/utils/grog/grog.pl: Stop using `&` sigil in subroutine calls;
      that's nonidiomatic Perl, an exception to the language's otherwise
      relentless dedication to sigil prefixes.
---
 ChangeLog              |  7 +++++++
 src/utils/grog/grog.pl | 48 ++++++++++++++++++++++++------------------------
 2 files changed, 31 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 87093ce7f..54dd33535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-08-02  G. Branden Robinson <[email protected]>
+
+       * src/utils/grog/grog.pl: Fix code style nit.  Stop using `&`
+       sigil in subroutine calls; that's nonidiomatic Perl, an
+       exception to the language's otherwise relentless dedication to
+       sigil prefixes.
+
 2025-08-02  G. Branden Robinson <[email protected]>
 
        [man]: Trivially refactor.  Rename `an-end` to
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index 4238b0b84..7c5b5233f 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -134,12 +134,12 @@ sub process_arguments {
     }
 
     # Handle options that cause an early exit.
-    &version() if ($arg eq '-v' || $arg eq '--version');
-    &usage(0) if ($arg eq '-h' || $arg eq '--help');
+    version() if ($arg eq '-v' || $arg eq '--version');
+    usage(0) if ($arg eq '-h' || $arg eq '--help');
 
     if ($arg =~ '^--.') {
-      &fail("unrecognized grog option '$arg'; ignored");
-      &usage(1);
+      fail("unrecognized grog option '$arg'; ignored");
+      usage(1);
       next;
     }
 
@@ -176,7 +176,7 @@ sub process_arguments {
 sub read_input {
   foreach my $file (@input_file) {
     unless (open(FILE, $file eq "-" ? $file : "< $file")) {
-      &fail("cannot open '$file': $!");
+      fail("cannot open '$file': $!");
       next;
     }
 
@@ -184,7 +184,7 @@ sub read_input {
 
     while (my $line = <FILE>) {
       chomp $line;
-      &interpret_line($line);
+      interpret_line($line);
     }
 
     close(FILE);
@@ -369,14 +369,14 @@ sub interpret_line {
   ##########
   # mdoc
   if ($macro =~ /^Dd$/) {
-    &push_main_package('doc');
+    push_main_package('doc');
     return;
   }
 
   ##########
   # old mdoc
   if ($macro =~ /^(Tp|Dp|De|Cx|Cl)$/) {
-    &push_main_package('doc-old');
+    push_main_package('doc-old');
     return;
   }
 
@@ -387,7 +387,7 @@ sub interpret_line {
                   n[12]|
                   sh
                  )$/x) {
-    &push_main_package('e');
+    push_main_package('e');
     return;
   }
 
@@ -410,16 +410,16 @@ sub interpret_line {
     # www.tmac muddies the waters, so omit it.  `MT` also used by man.
     if ($macro =~ /^LO$/) {
       if ($args =~ /^(DNAMN|MDAT|BIL|KOMP|DBET|BET|SIDOR)/) {
-       &push_main_package('mse');
+       push_main_package('mse');
        return;
       }
     } elsif ($macro =~ /^LT$/) {
       if ($args =~ /^(SVV|SVH)/) {
-       &push_main_package('mse');
+       push_main_package('mse');
        return;
       }
     }
-    &push_main_package('m');
+    push_main_package('m');
     return;
   }
 
@@ -455,7 +455,7 @@ sub interpret_line {
                   TOC|
                   T_MARGIN|
                  )$/x) {
-    &push_main_package('om');
+    push_main_package('om');
     return;
   }
 } # interpret_line()
@@ -552,16 +552,16 @@ sub infer_man_or_ms_package {
   } elsif ($ms_score == $man_score) {
     # If there was no TH call, it's not a (valid) man(7) document.
     if (!$score{'TH'}) {
-      &push_main_package('s');
+      push_main_package('s');
     } else {
-      &warn("document ambiguous; disambiguate with -man or -ms option");
+      warn("document ambiguous; disambiguate with -man or -ms option");
       $had_inference_problem = 1;
     }
     return 0;
   } elsif ($ms_score > $man_score) {
-    &push_main_package('s');
+    push_main_package('s');
   } else {
-    &push_main_package('an');
+    push_main_package('an');
   }
 
   return 1;
@@ -620,7 +620,7 @@ sub construct_command {
     for my $pkg (@main_package) {
       if (grep(/$pkg/, @inferred_main_package)) {
        $main_package = $pkg;
-       &warn("document ambiguous (choosing '$main_package'"
+       warn("document ambiguous (choosing '$main_package'"
              . " from '@inferred_main_package'); disambiguate with -m"
              . " option");
        $had_inference_problem = 1;
@@ -639,7 +639,7 @@ sub construct_command {
     if (grep(/$pkg/, @main_package)) {
       $is_auxiliary_package = 0;
       if ($main_package && ($pkg ne $main_package)) {
-       &warn("overriding inferred package '$main_package'"
+       warn("overriding inferred package '$main_package'"
              . " with requested package '$pkg'");
       }
       $main_package = $pkg;
@@ -689,13 +689,13 @@ my $in_unbuilt_source_tree = 0;
 
 $groff_version = '@VERSION@' unless ($in_unbuilt_source_tree);
 
-&process_arguments();
-&read_input();
+process_arguments();
+read_input();
 
 if ($have_any_valid_operands) {
-  &infer_preprocessors();
-  &infer_man_or_ms_package() if (scalar @inferred_main_package != 1);
-  &construct_command();
+  infer_preprocessors();
+  infer_man_or_ms_package() if (scalar @inferred_main_package != 1);
+  construct_command();
 }
 
 exit 2 if ($had_processing_problem);

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to