diff --git a/Bugzilla/RNG.pm b/Bugzilla/RNG.pm --- a/Bugzilla/RNG.pm +++ b/Bugzilla/RNG.pm @@ -60,13 +60,13 @@ # RNG Functions # ################# -sub rand (;$) { +sub rand { my ($limit) = @_; my $int = irand(); return _to_float($int, $limit); } -sub irand (;$) { +sub irand { my ($limit) = @_; Bugzilla::RNG::srand() if !defined $RNG; my $int = $RNG->irand(); @@ -81,7 +81,7 @@ return $int; } -sub srand (;$) { +sub srand { my ($value) = @_; # Remove any RNG that might already have been made. diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -50,7 +50,7 @@ use Text::Wrap; use Try::Tiny; -sub with_writable_database(&) { +sub with_writable_database { my ($code) = @_; my $dbh = Bugzilla->dbh_main; local Bugzilla->request_cache->{dbh} = $dbh; @@ -68,7 +68,7 @@ }; } -sub with_readonly_database(&) { +sub with_readonly_database { my ($code) = @_; local Bugzilla->request_cache->{dbh} = undef; local Bugzilla->request_cache->{error_mode} = ERROR_MODE_DIE; @@ -812,7 +812,7 @@ return trim($dtext); } -sub on_main_db (&) { +sub on_main_db { my $code = shift; my $original_dbh = Bugzilla->dbh; Bugzilla->request_cache->{dbh} = Bugzilla->dbh_main; diff --git a/Bugzilla/WebService/Util.pm b/Bugzilla/WebService/Util.pm --- a/Bugzilla/WebService/Util.pm +++ b/Bugzilla/WebService/Util.pm @@ -114,7 +114,7 @@ return (\@old_flags, \@new_flags); } -sub filter($$;$$) { +sub filter { my ($params, $hash, $types, $prefix) = @_; my %newhash = %$hash; @@ -125,7 +125,7 @@ return \%newhash; } -sub filter_wants($$;$$) { +sub filter_wants { my ($params, $field, $types, $prefix) = @_; # Since this is operation is resource intensive, we will cache the results diff --git a/extensions/Push/lib/Util.pm b/extensions/Push/lib/Util.pm --- a/extensions/Push/lib/Util.pm +++ b/extensions/Push/lib/Util.pm @@ -74,7 +74,7 @@ } # wrapper for map that works on array references -sub mapr(&$) { +sub mapr { my ($filter, $ra) = @_; my @result = map(&$filter, @$ra); return \@result; diff --git a/scripts/fixgroupqueries.pl b/scripts/fixgroupqueries.pl --- a/scripts/fixgroupqueries.pl +++ b/scripts/fixgroupqueries.pl @@ -41,7 +41,7 @@ USAGE } -sub do_namedqueries($$) { +sub do_namedqueries { my ($old, $new) = @_; $old = url_quote($old); $new = url_quote($new); @@ -72,7 +72,7 @@ } # series -sub do_series($$) { +sub do_series { my ($old, $new) = @_; $old = url_quote($old); $new = url_quote($new); diff --git a/scripts/fixqueries.pl b/scripts/fixqueries.pl --- a/scripts/fixqueries.pl +++ b/scripts/fixqueries.pl @@ -41,7 +41,7 @@ USAGE } -sub do_namedqueries($$$) { +sub do_namedqueries { my ($field, $old, $new) = @_; $old = url_quote($old); $new = url_quote($new); @@ -73,7 +73,7 @@ } # series -sub do_series($$$) { +sub do_series { my ($field, $old, $new) = @_; $old = url_quote($old); $new = url_quote($new); @@ -109,7 +109,7 @@ } # series_categories -sub do_series_categories($$) { +sub do_series_categories { my ($old, $new) = @_; my $dbh = Bugzilla->dbh; diff --git a/t/Support/Systemexec.pm b/t/Support/Systemexec.pm --- a/t/Support/Systemexec.pm +++ b/t/Support/Systemexec.pm @@ -14,11 +14,11 @@ use parent qw(Exporter); @Support::Systemexec::EXPORT = qw(system exec); -sub system($$@) { +sub system { 1; } -sub exec($$@) { +sub exec { 1; }