[Bps-public-commit] r9200 - Text-Quoted

ruz at bestpractical.com ruz at bestpractical.com
Wed Oct 3 07:02:21 EDT 2007


Author: ruz
Date: Wed Oct  3 07:02:20 2007
New Revision: 9200

Modified:
   Text-Quoted/   (props changed)
   Text-Quoted/Quoted.pm

Log:
 r18256 at cubic-pc:  cubic | 2007-10-03 13:43:07 +0400
 * use the same array for lines, splice it and then refill with new data


Modified: Text-Quoted/Quoted.pm
==============================================================================
--- Text-Quoted/Quoted.pm	(original)
+++ Text-Quoted/Quoted.pm	Wed Oct  3 07:02:20 2007
@@ -169,13 +169,12 @@
     # If the user passes in a null string, we really want to end up with _something_
 
     # DETABIFY
-    my @rawlines = Text::Tabs::expand( split /\n/, $text );
+    my @lines = Text::Tabs::expand( split /\n/, $text );
 
 
     # PARSE EACH LINE
 
-    my @lines;
-    foreach (@rawlines) {
+    foreach (splice @lines) {
         my %line = ( raw => $_ );
         s/\A([ \t]*)($quoter?)([ \t]*)//;
         $line{presig} = $line{prespace} = defn $1;



More information about the Bps-public-commit mailing list