[Koha-bugs] [Bug 11983] code to select patrons to purge needs to be centralized

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 20 03:56:51 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11983

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #12 from David Cook <dcook at prosentient.com.au> ---
Sounds good to me. I'm all for having method naming conventions. 

With Perl's "method names as strings"
(https://perldoc.perl.org/perlobj.html#Method-Call-Variations), I think you can
get the flexibility of Option 1 while using the code in Option 2. 

my $method = "filter_by_$arg";
my $filtered = $obj->$method();

Boom!

And yeah by standardizing method naming conventions, I think we could
potentially see some code re-use for methods that are more complex than your
average DIBC methods but less complex than super unique methods. You can do
some cool stuff with aliasing functions so that you can have different
module-specific names for the same generic method as well, so you might get
that relevant API while still having code re-use.

I see nothing to disagree with (which must be novel considering it's me).
Awesome ideas, Martin!

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list