On Wednesday 01 February 2006 21:58, Matthias Fuhrmann wrote: > just a question about the purpose of Long.pm. Am I right asuming, it > just tries to get local machines hostname and domainname. nothing else > additionaly. Correct? Just to ensure, i dont blow anything :) > > well, asuming this, a friend helped me solving the problem. in > Sys::Hostname::Long we replaced method 'exec_hostname_domainname' with this > one: > > 'exec_new_domainname' => { > 'title' => 'new version', > 'description' => 'new version', > 'exec' => sub { > open HOSTNAME, "<", "/etc/hostname.hme0" or warn; > open DOMAINNAME, "<", "/etc/defaultdomain" or > warn; my $tmp = <HOSTNAME> . '.' . <DOMAINNAME>; close HOSTNAME; > close DOMAINNAME; > $tmp =~ tr/\0\r\n//d; > return $tmp; > } > },
From my reading of the code the other day, it's actually cross-platform, so one change for you may be ok, but may not work for someone else. If it works for you, and the data returned by the new function is what data from the old function was, then there should be no problems (for your machine).