texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6231] reduce use of method call syntax


From: Gavin D. Smith
Subject: [6231] reduce use of method call syntax
Date: Thu, 30 Apr 2015 17:43:37 +0000

Revision: 6231
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6231
Author:   gavin
Date:     2015-04-30 17:43:36 +0000 (Thu, 30 Apr 2015)
Log Message:
-----------
reduce use of method call syntax

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Convert/Paragraph.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-04-30 17:28:47 UTC (rev 6230)
+++ trunk/ChangeLog     2015-04-30 17:43:36 UTC (rev 6231)
@@ -1,7 +1,8 @@
 2015-04-30  Gavin Smith  <address@hidden>
 
-       * tp/Texinfo/Parser.pm: Don't use object-oriented method call 
-       syntax for functions in same file.
+       * tp/Texinfo/Parser.pm, tp/Texinfo/Convert/Paragraph.pm:
+       Don't use object-oriented method call syntax for functions in 
+       same file.
 
 2015-04-29  Karl Berry  <address@hidden>
 

Modified: trunk/tp/Texinfo/Convert/Paragraph.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Paragraph.pm       2015-04-30 17:28:47 UTC (rev 
6230)
+++ trunk/tp/Texinfo/Convert/Paragraph.pm       2015-04-30 17:43:36 UTC (rev 
6231)
@@ -66,7 +66,7 @@
 {
   my $paragraph = shift;
   return '' if ($paragraph->{'ignore_columns'});
-  return $paragraph->_end_line();
+  return _end_line($paragraph);
 }
 
 sub end_line_count($)
@@ -79,7 +79,7 @@
 {
   my $paragraph = shift;
   $paragraph->{'end_line_count'} = 0;
-  return $paragraph->_end_line();
+  return _end_line($paragraph);
 }
 
 # end a line.
@@ -116,7 +116,7 @@
   my $paragraph = shift;
   my $add_spaces = shift;
   $paragraph->{'end_line_count'} = 0;
-  return $paragraph->_add_pending_word($add_spaces);
+  return _add_pending_word($paragraph, $add_spaces);
 }
 
 # put a pending word and spaces in the result string.
@@ -159,7 +159,7 @@
   my $paragraph = shift;
   $paragraph->{'end_line_count'} = 0;
   print STDERR "PARA END\n" if ($paragraph->{'DEBUG'});
-  my $result = $paragraph->_add_pending_word();
+  my $result = _add_pending_word($paragraph);
   if ($paragraph->{'counter'} != 0) {
     $result .= "\n"; 
     $paragraph->{'lines_counter'}++;
@@ -176,8 +176,8 @@
   my $end_sentence = shift;
   my $transparent = shift;
   $paragraph->{'end_line_count'} = 0;
-  return $paragraph->_add_next($word, undef, $space, $end_sentence, 
-                               $transparent);
+  return _add_next($paragraph, $word, undef, $space, $end_sentence, 
+                   $transparent);
 }
 
 # add a word and/or spaces and end of sentence.
@@ -216,7 +216,7 @@
       $result .= $paragraph->{'space'};
       $paragraph->{'space'} = '';
       $result .= $paragraph->{'word'};
-      $paragraph->_end_line();
+      _end_line($paragraph);
       $paragraph->{'word_counter'} = 0;
       $paragraph->{'word'} = undef;
       $paragraph->{'underlying_word'} = undef;
@@ -241,18 +241,18 @@
     if ($paragraph->{'counter'} != 0 and 
         $paragraph->{'counter'} + $paragraph->{'word_counter'} + 
            length($paragraph->{'space'}) > $paragraph->{'max'}) {
-      $result .= $paragraph->_cut_line();
+      $result .= _cut_line($paragraph);
     }
   }
   if (defined($space)) {
     if ($paragraph->{'protect_spaces'}) {
-      $result .= $paragraph->_add_text($space);
+      $result .= _add_text($paragraph, $space);
     } else {
-      $result .= $paragraph->_add_pending_word();
+      $result .= _add_pending_word($paragraph);
       $paragraph->{'space'} = $space;
       if ($paragraph->{'counter'} + length($paragraph->{'space'}) 
                       > $paragraph->{'max'}) {
-        $result .= $paragraph->_cut_line();
+        $result .= _cut_line($paragraph);
       }
     }
   }
@@ -304,7 +304,7 @@
     if defined($frenchspacing);
   # begin a word, to have something even if empty
   if ($space_protection) {
-    $paragraph->_add_next('');
+    _add_next($paragraph, '');
   }
   return '';
 }
@@ -363,10 +363,10 @@
         if ($paragraph->{'counter'} != 0 and 
             $paragraph->{'counter'} + $paragraph->{'word_counter'} + 
                length($paragraph->{'space'}) > $paragraph->{'max'}) {
-          $result .= $paragraph->_cut_line();
+          $result .= _cut_line($paragraph);
         }
       } else {
-        $result .= $paragraph->_add_pending_word();
+        $result .= _add_pending_word($paragraph);
         if ($paragraph->{'counter'} != 0) {
           if (!$paragraph->{'frenchspacing'} 
               and $paragraph->{'end_sentence'} 
@@ -397,10 +397,10 @@
       #delete $paragraph->{'end_sentence'};
       if ($paragraph->{'counter'} + length($paragraph->{'space'}) 
                       > $paragraph->{'max'}) {
-        $result .= $paragraph->_cut_line();
+        $result .= _cut_line($paragraph);
       }
       if ($spaces =~ /\n/ and $paragraph->{'keep_end_lines'}) {
-        $result .= $paragraph->_end_line();
+        $result .= _end_line($paragraph);
       }
     } elsif ($text =~ s/^(\p{InFullwidth})//) {
       my $added = $1;
@@ -423,9 +423,9 @@
       if ($paragraph->{'counter'} != 0 and
           $paragraph->{'counter'} + $paragraph->{'word_counter'} 
                                > $paragraph->{'max'}) {
-        $result .= $paragraph->_cut_line();
+        $result .= _cut_line($paragraph);
       }
-      $result .= $paragraph->_add_pending_word();
+      $result .= _add_pending_word($paragraph);
       delete $paragraph->{'end_sentence'};
       $paragraph->{'space'} = '';
     } elsif ($text =~ s/^(([^\s\p{InFullwidth}]|[\x{202f}\x{00a0}])+)//) {
@@ -438,7 +438,7 @@
         $underlying_added_word = $added_word;
       }
 
-      $result .= $paragraph->_add_next($added_word, $underlying_added_word);
+      $result .= _add_next($paragraph, $added_word, $underlying_added_word);
 
       # now check if it is considered as an end of sentence
       if (defined($paragraph->{'end_sentence'})




reply via email to

[Prev in Thread] Current Thread [Next in Thread]