Subject: | Documentation error |
Date: | Thu, 29 May 2014 16:29:14 +0200 |
To: | bug-String-Diff [...] rt.cpan.org |
From: | Valmi Dufour-Lussier <valmid [...] gmail.com> |
The documentation contains this example:
my $diff = String::Diff::diff('this is Perl', 'this is Ruby',{
remove_open => '<del>',
remove_close => '</del>',
append_open => '<ins>',
append_close => '</ins>',
});
But String::Diff::diff expects a hash and not a hash reference, so
running the example as is gives:
Odd number of elements in hash assignment at
/usr/local/share/perl/5.14.2/String/Diff.pm line 117.
The example should read:
my $diff = String::Diff::diff('this is Perl', 'this is Ruby',
remove_open => '<del>',
remove_close => '</del>',
append_open => '<ins>',
append_close => '</ins>',
);