Skip Menu |
 

This queue is for tickets about the Text-Similarity CPAN distribution.

Report information
The Basics
Id: 107584
Status: resolved
Priority: 0/
Queue: Text-Similarity

People
Owner: TPEDERSE [...] cpan.org
Requestors: ASB [...] cpan.org
Cc:
AdminCc:

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



Subject: Please remove unnecessary string concatenation on variable instantiation
Download (untitled) / with headers
text/plain 776b
In Text::Similarity::Overlaps in line 168 and 169, variables are initially instantiated using the string concatenation operator instead of the assignment operator. I investigated a bit because I found it uncommon. There seems to be no difference in writing the equals operator or the string concatenation. So, to improve the readability of the source code, could you please change line 168 & 169 to use the assignment operator "=" ? Cf. the relevant code here: https://metacpan.org/source/TPEDERSE/Text-Similarity-0.10/lib/Text/Similarity/Overlaps.pm#L168 Extract: my $str1 .= $self->sanitizeString ($input1); my $str2 .= $self->sanitizeString ($input2); Should be: my $str1 = $self->sanitizeString ($input1); my $str2 = $self->sanitizeString ($input2);
Download (untitled) / with headers
text/plain 897b
On Tue Oct 06 16:36:46 2015, ASB wrote: Show quoted text
> In Text::Similarity::Overlaps in line 168 and 169, variables are > initially instantiated using the string concatenation operator instead > of the assignment operator. > > I investigated a bit because I found it uncommon. There seems to be no > difference in writing the equals operator or the string concatenation. > > So, to improve the readability of the source code, could you please > change line 168 & 169 to use the assignment operator "=" ? > > Cf. the relevant code here: https://metacpan.org/source/TPEDERSE/Text- > Similarity-0.10/lib/Text/Similarity/Overlaps.pm#L168 > > Extract: > my $str1 .= $self->sanitizeString ($input1); > my $str2 .= $self->sanitizeString ($input2); > > Should be: > my $str1 = $self->sanitizeString ($input1); > my $str2 = $self->sanitizeString ($input2);
Resolved in what will become version 0.11
On Wed Oct 07 15:17:09 2015, TPEDERSE wrote: Show quoted text
> On Tue Oct 06 16:36:46 2015, ASB wrote:
> > In Text::Similarity::Overlaps in line 168 and 169, variables are > > initially instantiated using the string concatenation operator instead > > of the assignment operator. > > > > I investigated a bit because I found it uncommon. There seems to be no > > difference in writing the equals operator or the string concatenation. > > > > So, to improve the readability of the source code, could you please > > change line 168 & 169 to use the assignment operator "=" ? > > > > Cf. the relevant code here: https://metacpan.org/source/TPEDERSE/Text- > > Similarity-0.10/lib/Text/Similarity/Overlaps.pm#L168 > > > > Extract: > > my $str1 .= $self->sanitizeString ($input1); > > my $str2 .= $self->sanitizeString ($input2); > > > > Should be: > > my $str1 = $self->sanitizeString ($input1); > > my $str2 = $self->sanitizeString ($input2);
> > Resolved in what will become version 0.11
It turns out this change causes errors in test cases, and so will not be made.
Concatenation initialization appears necessary - removing it causes test case failure.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.