Skip Menu |

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

Report information
The Basics
Id: 107621
Status: open
Priority: 0/
Queue: Text-Similarity

People
Owner: Nobody in particular
Requestors: ASB [...] cpan.org
Cc:
AdminCc:

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



Subject: don't use lvalue accessor
Text::Similarity makes heavy use of lvalue accessors. I searched for good reasons to use them, but I didn't find any, except for one: they are syntactic sugar at a cost of source code maintability. What was your motivation to use lvalue accessors? Perl Best Practices does recommend not to use lvalue accessors (cf. chapter 15 / "Don't use lvalue accessors"), cf. http://archive.oreilly.com/pub/a/perl/excerpts/perl-best-practices/appendix-b.html#perlbp-APP-B-SECT-14 Maybe it reduces the code complexity, so more other people can read and understand the source code, as well as contribute. Would it be OK to change all lvalue accessors to normal ones? Then I would try to create a patch for it.
Subject: Re: [rt.cpan.org #107621] don't use lvalue accessor
Date: Thu, 8 Oct 2015 05:32:47 -0500
To: bug-Text-Similarity [...] rt.cpan.org
From: Ted Pedersen <duluthted [...] gmail.com>
I don't have a clear recollection of the decisions that went into using lvalue acessors. But, we are always willing to accept patches that might improve the functionality, readability, or maintainability of the code, so if you are able to make things more compliant with best practices that would be great! On Thu, Oct 8, 2015 at 3:36 AM, Alexander Becker via RT < bug-Text-Similarity@rt.cpan.org> wrote: Show quoted text
> Thu Oct 08 04:36:53 2015: Request 107621 was acted upon. > Transaction: Ticket created by ASB > Queue: Text-Similarity > Subject: don't use lvalue accessor > Broken in: 0.11 > Severity: Wishlist > Owner: Nobody > Requestors: ASB@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107621 > > > > Text::Similarity makes heavy use of lvalue accessors. > I searched for good reasons to use them, but I didn't find any, except for > one: they are syntactic sugar at a cost of source code maintability. > > What was your motivation to use lvalue accessors? > > Perl Best Practices does recommend not to use lvalue accessors (cf. > chapter 15 / "Don't use lvalue accessors"), cf. > http://archive.oreilly.com/pub/a/perl/excerpts/perl-best-practices/appendix-b.html#perlbp-APP-B-SECT-14 > > Maybe it reduces the code complexity, so more other people can read and > understand the source code, as well as contribute. > > Would it be OK to change all lvalue accessors to normal ones? Then I would > try to create a patch for it. >