[Koha-bugs] [Bug 13240] advanced_notices.pl contains code obfuscation
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Nov 13 14:08:49 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13240
Frédéric Demians <frederic at tamil.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |frederic at tamil.fr
--- Comment #3 from Frédéric Demians <frederic at tamil.fr> ---
You replace:
my $digest = $due_digest->{$upcoming->{'borrowernumber'}} ||= {};
$digest->{email} ||= $from_address;
$digest->{count}++;
With:
$due_digest->{$upcoming->{borrowernumber}}{email} = $from_address;
$due_digest->{$upcoming->{borrowernumber}}{count}++;
But why exactly? The first syntax is Perlish, with ||=, but not to the point to
be unreadable. And the second syntax uses autovivification which isn't that
readable either. And the second syntax uses $h->{}{} which isn't so good:
$h->{}->{} should be preferred, imho.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list