diff options
author | Eric Wong <e@80x24.org> | 2023-11-13 13:15:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-13 21:54:59 +0000 |
commit | c560ab9e67476ce7b4438f8323d8ae9e775e790e (patch) | |
tree | 9ecaf00583506df226a746df54af4375cc36861e /lib/PublicInbox/XapHelperCxx.pm | |
parent | 09f486cfa17019ad742853e3158ae4a5f580180c (diff) | |
download | public-inbox-c560ab9e67476ce7b4438f8323d8ae9e775e790e.tar.gz |
No need to suffer through an extra dose of slow Perl load times when we can drive the build in the big parent Perl process and get the executable path name to pass to spawn directly.
Diffstat (limited to 'lib/PublicInbox/XapHelperCxx.pm')
-rw-r--r-- | lib/PublicInbox/XapHelperCxx.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm index 3afdd69e..e516b111 100644 --- a/lib/PublicInbox/XapHelperCxx.pm +++ b/lib/PublicInbox/XapHelperCxx.pm @@ -114,17 +114,16 @@ sub check_build () { needs_rebuild() ? build() : 0; } -sub start (@) { +# returns spawn arg +sub cmd { check_build(); my @cmd; if (my $v = $ENV{VALGRIND}) { $v = 'valgrind -v' if $v eq '1'; @cmd = split(/\s+/, $v); } - push @cmd, $bin, @_; - my $prog = $cmd[0]; - $cmd[0] =~ s!\A.*?/([^/]+)\z!$1!; - exec { $prog } @cmd; + push @cmd, $bin; + \@cmd; } 1; |