projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cleanup's
[p5sagit/p5-mst-13.2.git]
/
ext
/
Sys
/
Hostname
/
Hostname.t
1
#!./perl
2
3
BEGIN {
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
13
use Sys::Hostname;
14
15
eval {
16
$host = hostname;
17
};
18
19
if ($@) {
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
}