Subject: | Now newline in output, when *not* using filenames as parameters for diff() |
Date: | Fri, 25 Dec 2015 21:15:16 +0100 |
To: | bug-Text-Diff [...] rt.cpan.org |
From: | LÉVAI Dániel <leva [...] ecentrum.hu> |
Easy to test:
==========8<==========
$ perl -MText::Diff -e 'my $a = [ 'a' ]; my $b = [ 'b' ]; print diff($a, $b) . "\n";'
@@ -1 +1 @@
-a+b
==========8<==========
This is the case with every output 'STYLE'.
However, when using filenames with the same contents:
==========8<==========
$ echo a > a
$ echo b > b
$ perl -MText::Diff -e 'print diff("a", "b") . "\n";'
--- a Fri Dec 25 21:13:29 2015
+++ b Fri Dec 25 21:13:31 2015
@@ -1 +1 @@
-a
+b
==========8<==========
... it works.