From: Don Armstrong Date: Tue, 3 Jul 2007 08:37:01 +0000 (-0700) Subject: * Fix the Debbugs::Control bug regex X-Git-Tag: release/2.6.0~528^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=45b9dc0e4698d73c451331f9e6ec86d22b1393a8;hp=1103c0f0e2b75f6e7bc04c0e3432251895d3a705;p=debbugs.git * Fix the Debbugs::Control bug regex * Fix $_ thinko in bug_archiveable --- diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index fe25f6f..859d5e8 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -161,7 +161,7 @@ This routine archives a bug sub bug_archive { my %param = validate_with(params => \@_, spec => {bug => {type => SCALAR, - regex => qr/^\d+/, + regex => qr/^\d+$/, }, check_archiveable => {type => BOOLEAN, default => 1, diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 7dedda2..ce58e99 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -627,7 +627,7 @@ sub bug_archiveable{ return $cannot_archive if not defined $status->{done} or not length $status->{done}; # If we just are checking if the bug can be archived, we'll not even bother # checking the versioning information if the bug has been -done for less than 28 days. - my $log_file = getbugcomponent($_,'log'); + my $log_file = getbugcomponent($param{bug},'log'); if (not defined $log_file) { print STDERR "Cannot archive $param{bug} because the log doesn't exists\n" if $DEBUG; }