Created attachment 175773 [details]
Upstream commit 259f22af explicitly sets the make variable PERL_PATH to /usr/local/bin/perl. For some reason this overrides the PERL_PATH we set in the port Makefile. The configure script provides a --with-perl, which works properly.
Patch is attached.
Created attachment 177539 [details]
[patch] use --with-perl to specify perl command
I hit this, too.
Attached is my patch. I leave it to the maintainer whether to bump PORTREVISION. If perl was not found, the build fails. But it's possible that the wrong perl could be found and the build succeeds. It's probably correct to bump PORTREVISION, but more than likely very few people are affected.
Just for further clarification... config.make.uname sets PERL_PATH to /usr/local/bin/perl. Putting PERL_PATH in the environment (MAKE_ENV) is not enough to override that Makefile variable assignment (the make var takes precedence over the env var in this case). Using --with-perl, however, overrides the default setting in config.mak.uname (in config.mak.autogen). So that's why using --with-perl is a better substitute for putting PERL_PATH in the environment.
QA info with attachment 177539 [details] applied:
- portlint ok (no new warnings, no errors)
- stage-qa ok (no new warnings)
- poudriere testport ok (tested on stable-10/64)
A commit references this bug:
Date: Thu Dec 1 15:24:06 UTC 2016
New revision: 427505
- Fix build with PERL and non-default LOCALBASE 
- Fix build with DEVELOPER=yes 
- Do not install ZSH completion 
- ZSH installs a better version itself
- Fix PLIST
- Bump PORTREVISION
PR: 213494 
214870  (based on)
Submitted by: John Hein <firstname.lastname@example.org>  
Michael Zuo <email@example.com>
Sponsored by: Rubicon Communications (Netgate)