According to the "Net::Config" manual: "Net::Config" holds configuration data for the modules in the libnet distribuion. During installation you will be asked for these values.
The configuration data is held globally in a file in the perl installation tree, but a user may override any of these values by providing their own. This can be done by having a ".libnetrc" file in their home directory. This file should return a reference to a HASH containing the keys described below. For example
.libnetrc { nntp_hosts => [ "my_prefered_host" ], ph_hosts => [ "my_ph_server" ], }
I've got a ".libnetrc" file in my home directory. It reads { 'nntp_hosts' => [ "news.dacor.net" ], 'smtp_hosts' => [ "mail.dacor.net" ], 'pop3_hosts' => [ "mail.dacor.net", "mailstore.bgsu.edu" ], } and the test script %mylibnet = %{do "$ENV{HOME}/.libnetrc"}; for (keys %mylibnet) { print "$_ => @{$mylibnet{$_}}\n"; } produces just what it should, namely smtp_hosts => mail.dacor.net pop3_hosts => mail.dacor.net mailstore.bgsu.edu nntp_hosts => news.dacor.net
Nevertheless, use Net::Config qw(%NetConfig); always produces the, more or less empty, hash %NetConfig = ( 'ftp_int_passive' => 0, 'test_exist' => 1, 'time_hosts' => [], 'ftp_testhost' => undef, 'inet_domain' => undef, 'test_hosts' => 1, 'nntp_hosts' => [], 'smtp_hosts' => [], 'pop3_hosts' => [], 'snpp_hosts' => [], 'ph_hosts' => [], 'daytime_hosts' => [], ); contained in "/System/Library/Perl/5.8.1/Net/libnet.cfg".
What am I doing wrong here? At this point "Net::Config" is useless (unless I decide to rewrite "libnet.cfg").
Thanks for any help you can give me!
Vic