v2:// lei outputs are on the filesystem, so putting $HOST:$PORT
is nonsensical. We'll also keep `127.0.0.1' or `[::1]' since
it's harmless and can point out obvious errors in system
configuration when testing with old Perls or libraries.
my @msg = ref($_[0]) eq 'ARRAY' ? @{$_[0]} : @_;
if (!$lei_loud) {
for (@msg) {
- s!\A([a-z0-9]+://)[^/]+/!$1\$HOST_PORT/!;
+ s!(127\.0\.0\.1|\[::1\]):(?:\d+)!$1:\$PORT!g;
s!$tmpdir\b/(?:[^/]+/)?!\$TMPDIR/!g;
s!\Q$PWD\E\b!\$PWD!g;
}