From aa5e41555e7e4b9c74c8de5526d626f3aa683625 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 15 Jul 2018 09:04:31 -0700 Subject: [PATCH] Set $pass to binary value; rename $date to $mentorDate. --- scripts/rt-outreachy-payment-next.plx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/rt-outreachy-payment-next.plx b/scripts/rt-outreachy-payment-next.plx index b2aed07..601e0fa 100755 --- a/scripts/rt-outreachy-payment-next.plx +++ b/scripts/rt-outreachy-payment-next.plx @@ -47,15 +47,17 @@ while (my $file = readdir $dh) { next; } my($pass, $name) = ($1, $2); + $pass = ($pass =~ /success/) ? 1 : 0; + open(my $fh, "<", File::Spec->catfile($PAYMENT_DIR, $file)); - my $date; + my $mentorDate; while (my $line = <$fh> ) { if ($line =~ /^\s*Date\s*:\s*(.+)\s*$/) { - $date = UnixDate(ParseDate($1), "%Y-%m-%d"); + $mentorDate = UnixDate(ParseDate($1), "%Y-%m-%d"); next; } } - die "Inside $file there is no valid Date:" if (not defined $date); + die "Inside $file there is no valid Date:" if (not defined $mentorDate); my(@nameComponents) = split(/\s*-\s*/, $name); my(@searchTerms);