The second [problem] is how to test any solution on my machine.
If I understand you correctly, the thing you want to test is "if there is another perl earlier on the path than the one I am being built with, it has not been called". So mimic that scenario:
% cat t/perl
#!/bin/bash
echo "Wrong perl"
exit 1
% perl -E 'say "ok"'
ok
% PATH=`pwd`/t:$PATH \
perl -E 'say "ok"'
Wrong perl
% PATH=`pwd`/t:$PATH \
/usr/bin/perl -E 'say "ok"'
ok
%
You could also have the wrong-perl script touch a file, in case something invokes it and ignores both its output and its exit code.