about summary refs log tree commit homepage
path: root/lib/PublicInbox/Xapcmd.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-08-12 09:17:14 +0000
committerEric Wong <e@yhbt.net>2020-08-13 02:22:52 +0000
commit575e948ed8880326fb25ce8fe74f7c95881186ca (patch)
treefedcf9426865a97b1fe28f95733d5b617a4c2879 /lib/PublicInbox/Xapcmd.pm
parent6708ef2102e549dfc46dad0a3d100e24348f5e28 (diff)
downloadpublic-inbox-575e948ed8880326fb25ce8fe74f7c95881186ca.tar.gz
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)
Diffstat (limited to 'lib/PublicInbox/Xapcmd.pm')
-rw-r--r--lib/PublicInbox/Xapcmd.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm
index 348621ce..6fcc9e90 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";