SVN-Notify - Sub prepare_recipients: why removing next email-regex pair?

Posted on Thu May 3 12:48:18 2007 by mp090779
Sub prepare_recipients: why removing next email-regex pair?
In the sub prepare_recipients() while going through the result of "svnlook dirs-changed" the next pair of email/regex will be removed when we have a match.
while (<$fh>) { s/[\n\r\/\\]+$//; for (my $i = 0; $i < @$regexen; $i += 2) { my ($email, $rx) = @{$regexen}[$i, $i + 1]; # If the directory matches the regex, save the email. $self->_dbpnt( qq{"$_" matches $rx?}); #PMH if (/$rx/) { $self->_dbpnt( qq{"$_" matched $rx}) if $self->{verbose} > 1; #PMH push @$tos, $email unless $seen{$email}++; splice @$regexen, $i, 2; <== HERE } }
I did not get a clue why we are doing this here. I use the class in my script where I read all the mappings from a config file. When I get a match the next entry in the array @regexen will be removed. Well if the next regex would not give a match you would not recognice anything. Does anyone know the details behind this codeline? Thanks Peter
Write a response