From e0f57972edf64c12a6e78d5231a025c2a1acb6bf Mon Sep 17 00:00:00 2001
From: Steve Hancock <perltidy@users.sourceforge.net>
Date: Mon, 27 Nov 2023 08:15:50 -0800
Subject: [PATCH] add comment

---
 lib/Perl/Tidy/FileWriter.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm
index c01cc9a7..6832f989 100644
--- a/lib/Perl/Tidy/FileWriter.pm
+++ b/lib/Perl/Tidy/FileWriter.pm
@@ -132,6 +132,8 @@ EOM
 
 sub warning {
     my ( $self, $msg ) = @_;
+
+    # log a warning message from any caller
     my $logger_object = $self->[_logger_object_];
     if ($logger_object) { $logger_object->warning($msg); }
     return;
@@ -201,6 +203,11 @@ EOM
 
 sub setup_convergence_test {
     my ( $self, $rlist ) = @_;
+
+    # $rlist is a reference to a list of line-ending token indexes 'K' of
+    # the input stream. We will compare these with the line-ending token
+    # indexes of the output stream. If they are identical, then we have
+    # convergence.
     if ( @{$rlist} ) {
 
         # We are going to destroy the list, so make a copy
@@ -261,11 +268,11 @@ sub want_blank_line {
 } ## end sub want_blank_line
 
 sub require_blank_code_lines {
+    my ( $self, $count ) = @_;
 
     # write out the requested number of blanks regardless of the value of -mbl
     # unless -mbl=0.  This allows extra blank lines to be written for subs and
     # packages even with the default -mbl=1
-    my ( $self, $count ) = @_;
     my $need   = $count - $self->[_consecutive_blank_lines_];
     my $rOpts  = $self->[_rOpts_];
     my $forced = $rOpts->{'maximum-consecutive-blank-lines'} > 0;
-- 
2.39.5