I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-07-11 18:27:15-07 by cmv
Fails on SunOS with non-fully-qualified NODENAME
Martin-
Thanks for the quick fix for the PATH problem. Here is another suggestion.

On Sun workstations, if you set your name by using a non-Fully-Qualified-Domain-Name (FQDN) in the /etc/nodename file, then Net::Address::Ethernet will fail doing the arp, since the arp table has FQDNs in it.
As an example: /etc/nodename contains "snoopy" $ arp snoopy snoopy (192.11.45.19) -- no entry $ arp snoopy.myfqdn.com snoopy.myfqdn.com (123.45.67.89) at 1:2:3:4:5 permanent published

Many folks use non-FQDNs this way when they want to use dhcp to acquire an IP address, and have their nodename used on whatever domain they plug into.

The fix for this should be pretty easy. Instead of using Sys::Hostname to get the hostname, I would suggest using Net::Domain.
Here's a quick example: $ perl -e 'use Net::Domain hostfqdn; print hostfqdn(),"\n"' snoopy.myfqdn.com
I don't know if this would break anything on other platforms though.
Direct Responses: 2624 | Write a response
Posted on 2006-07-14 15:40:45-07 by cmv in response to 2611
Re: Fails on SunOS with non-fully-qualified NODENAME
Martin- A quick followup on changing Net::Address::Ethernet to use Net::Domain for the hostname, based on my trial modifications of your module:

1.) Depending on configuration, you'll want to do an arp on BOTH the fully qualified and non-fully qualified domain name. The Net::Domain package has both the hostname and hostfqdn calls, which should provide both.

2.) I think you'll want to change your code to try one first, and if that fails, then try the other. On my implementation, I noticed that you saw the STDERR error message when arp fails. I don't know if you want to try and hide that or not.

3.) My implementation went something like this:
my @as = qx{ $ARP hostname }; if($?) { @as = qx{ $ARP hostfqdn }; }

Hope this helps. -Craig
Direct Responses: 2626 | Write a response
Posted on 2006-07-15 12:42:27-07 by mthurn in response to 2624
Re: Fails on SunOS with non-fully-qualified NODENAME
Good ideas, thank you. I made some changes but won't be able to test it on Solaris/Linux until Monday at work.
Direct Responses: Write a response