File: hostname.t

package info (click to toggle)
libnet-perl 1.0502-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 284 kB
  • ctags: 418
  • sloc: perl: 3,705; makefile: 43; sh: 4
file content (19 lines) | stat: -rw-r--r-- 269 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

use Net::Domain qw(hostname domainname hostdomain);
use Net::Config;

unless($NetConfig{test_hosts}) {
    print "1..0\n";
    exit 0;
}

print "1..1\n";

$domain = domainname();

if(defined $domain && $domain ne "") {
 print "ok 1\n";
}
else {
 print "not ok 1\n";
}