1#!./perl
2
3BEGIN {
4    chdir 't' if -d 't';
5    @INC = '../lib';
6    require Config; import Config;
7    if ($Config{'extensions'} !~ /\bSys\/Hostname\b/) {
8      print "1..0 # Skip: Sys::Hostname was not built\n";
9      exit 0;
10    }
11}
12
13use Sys::Hostname;
14
15eval {
16    $host = hostname;
17};
18
19if ($@) {
20    print "1..0\n" if $@ =~ /Cannot get host name/;
21} else {
22    print "1..1\n";
23    print "# \$host = `$host'\n";
24    print "ok 1\n";
25}
26