diff options
author | Eric Wong <e@80x24.org> | 2019-11-15 09:50:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-16 11:05:23 +0000 |
commit | d155f989769861be45938345350f07365ca945c1 (patch) | |
tree | 9837aca73c26c3189965dbafddf376c15dd62c0f /script | |
parent | 321defd4c722ae897fc99e10ce8d05515a97e91f (diff) | |
download | public-inbox-d155f989769861be45938345350f07365ca945c1.tar.gz |
Avoid 'Variable "%s" will not stay shared' warnings when the contents of this script eval'ed into a sub.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-index | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/script/public-inbox-index b/script/public-inbox-index index 139b6e56..102381c3 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -18,11 +18,10 @@ GetOptions($opt, qw(verbose|v+ reindex jobs|j=i prune indexlevel|L=s)) or die "bad command-line args\n$usage"; die "--jobs must be positive\n" if defined $opt->{jobs} && $opt->{jobs} <= 0; -sub usage { print STDERR "Usage: $usage\n"; exit 1 } my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV); PublicInbox::Admin::require_or_die('-index'); -usage() unless @ibxs; +unless (@ibxs) { print STDERR "Usage: $usage\n"; exit 1 } my $mods = {}; foreach my $ibx (@ibxs) { # XXX: users can shoot themselves in the foot, with opt->{indexlevel} |