<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Mark,</blockquote><div>You were spot on when you said "there must be some side-effect obscuring the code"</div><div><br></div><div>$upcoming_digest is set on line 281:</div><div><br></div><div><a href="http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/cronjobs/advance_notices.pl;h=62e36e4a92920b2bafc67c79043bf0a197491842;hb=HEAD#l281">http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/cronjobs/advance_notices.pl;h=62e36e4a92920b2bafc67c79043bf0a197491842;hb=HEAD#l281</a><br></div><div><br></div><div>Here's the code snippit</div><div><br></div><div>281             my $digest = $upcoming_digest->{$upcoming->{'borrowernumber'}} ||= {};<br></div><div><br></div><div>This is saying</div><div><br></div><div>If $upcoming_digest->{$upcoming->{'borrowernumber'}} is false, set it to an empy hashref.</div><div><br></div><div>Then set the $digest to the value of $upcoming_digest->{$upcoming->{'borrowernumber'}}.</div><div><br></div><div>It just so happens that <a href="http://advance_notices.pl">advance_notices.pl</a> was the first piece of Koha code that I read through in detail ,and I remember griping about it in #koha:</div><div><br></div><div><a href="http://irc.koha-community.org/koha/2014-01-22#i_1455327">http://irc.koha-community.org/koha/2014-01-22#i_1455327</a></div><div><br></div><div>Your reply was</div><div><br></div><div>15:39<span class="" style="white-space:pre">  </span>mtompset<span class="" style="white-space:pre">  > </span>Oh my! That is perl abuse. :P<br></div><div><br></div><div>;-) ;-)</div><div><br></div><div>Unfortunately, I didn't file a bug report as suggested by tcohen.</div><div><br></div><div>--Barton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 4:27 PM, Mark Tompsett <span dir="ltr"><<a href="mailto:mtompset@hotmail.com" target="_blank">mtompset@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000">
<div>Greetings,</div>
<div> </div>
<div>I was reading misc/cronjobs/<a href="http://advance_notices.pl" target="_blank">advance_notices.pl</a> and was trying to make sense 
of where $upcoming_digest is set. I think there must be some side-effect 
obscuring the code. I was wondering if a second pair of eyes might find it. I 
was trying to determine how $digest->{email} gets set for the from_address 
call to C4::Letters::EnqueueLetter.</div>
<div> </div>
<div>GPML,</div>
<div>Mark Tompsett</div>
<div> </div></div></div></div>
<br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div>