Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the String-Diff CPAN distribution.

Report information
The Basics
Id: 96057
Status: resolved
Priority: 0/
Queue: String-Diff

People
Owner: Nobody in particular
Requestors: valmid [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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>', );
Thank you for reporting. It was fixed on version 0.07. On 2014-5月-29 木 10:29:46, valmid@gmail.com wrote: Show quoted text
> 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>', > );