unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH 1/6] xapcmd: simplify sub reference
  2020-08-12  9:17 [PATCH 0/6] xcpdb -index improvements Eric Wong
@ 2020-08-12  9:17 ` Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-08-12  9:17 UTC (permalink / raw)
  To: meta

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";

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-12  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  9:17 [PATCH 0/6] xcpdb -index improvements Eric Wong
2020-08-12  9:17 ` [PATCH 1/6] xapcmd: simplify sub reference Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git