Commits

Shlomi Fish  committed 87793b7

Add ors at the end of each line.

  • Participants
  • Parent commits 7a05745

Comments (0)

Files changed (1)

File config-inifiles/lib/Config/IniFiles.pm

 =cut
 
 sub _OutputParam {
-    my ($self, $sect, $parm, $val, $ors, $end_comment, $output_cb) = @_;
+    my ($self, $sect, $parm, $val, $end_comment, $output_cb) = @_;
 
     my $line_loop = sub {
         my ($mapper) = @_;
 
         foreach my $line (@{$val}[0 .. $#$val-1]) {
-            $output_cb->($mapper->($line), $ors);
+            $output_cb->($mapper->($line));
         }
         $output_cb->(
             $mapper->($val->[-1]),
             ($end_comment ? (" $self->{comment_char} $end_comment") : ()),
-            $ors
         );
         return;
     };
     if (! @$val) {
         # An empty variable - see:
         # https://rt.cpan.org/Public/Bug/Display.html?id=68554
-        $output_cb->("$parm=$ors");
+        $output_cb->("$parm=");
     }
     elsif ((@$val == 1) or $self->{nomultiline}) {
         $line_loop->(sub { my ($line) = @_; return "$parm=$line"; });
             $eotmark .= $letters[rand(@letters)];
         }
 
-        $output_cb->("$parm= <<$eotmark$ors");
+        $output_cb->("$parm= <<$eotmark");
         $line_loop->(sub { my ($line) = @_; return $line; });
-        $output_cb->("$eotmark$ors");
+        $output_cb->("$eotmark");
     }
 
     return;
                     ? $val
                     : [split /[$ors]/, $val, -1]
                 ),
-                $ors,
                 defined $end_comment ? $end_comment : "",
-                sub { print {$fh} @_; },
+                sub { print {$fh} (@_, $ors); },
             );
         }
     }