We don't need to fully-qualify when referring to subs in
the same namespace, nor do we need make a SCALAR ref only
to dereference it
(Yes, still learning Perl :x)
---
lib/PublicInbox/Xapcmd.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm
index 348621cef..6fcc9e90c 100644
--- a/lib/PublicInbox/Xapcmd.pm
+++ b/lib/PublicInbox/Xapcmd.pm
@@ -253,7 +253,7 @@ sub _run {
sub run {
my ($ibx, $task, $opt) = @_; # task = 'cpdb' or 'compact'
- my $cb = \&${\"PublicInbox::Xapcmd::$task"};
+ my $cb = \&$task;
PublicInbox::Admin::progress_prepare($opt ||= {});
defined(my $dir = $ibx->{inboxdir}) or die "no inboxdir defined\n";
-d $dir or die "inboxdir=$dir does not exist\n";
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/