From: Andreas J. Koenig Date: Fri, 5 Sep 1997 00:00:00 +0000 (+0000) Subject: 5.004m4t1: perlbug: NIS domainname gets into wrong places X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=41f926b844140b7f7eaa9302113e45df3a9f9ff4;p=p5sagit%2Fp5-mst-13.2.git 5.004m4t1: perlbug: NIS domainname gets into wrong places >>>>> Jarkko Hietaniemi writes: jhi> [patch mode] jhi> I suggest the following patch: appending the ".`domainname`" only iff jhi> it contains dots and when last element has only [A-Za-z] and is no jhi> longer than 3 characters. What were the latest plans about adding new jhi> top level domains? Will these heuristics still be true? No. And I recall we have been flamed heavily in the past for using `domainname` at all and I'm surprised that we still do. I'd suggest such a patch instead: p5p-msgid: sfcg1qy38as.fsf@anna.in-berlin.de --- diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 6b670fc..0827db8 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -292,12 +292,9 @@ EOF $domain = Mail::Util::maildomain(); } elsif ($Is_MSWin32) { $domain = $ENV{'USERDOMAIN'}; - } elsif ($Is_VMS) { + } else { require Sys::Hostname; $domain = Sys::Hostname::hostname(); - } else { - $domain = `hostname`.".".`domainname`; - $domain =~ s/[\r\n]+//g; } my($guess);