1 package System::Introspector::Host;
7 hostname => $self->_gather_hostname,
8 uname => $self->_gather_uname_info,
23 sub _gather_uname_info {
26 for my $field (@UnameFields) {
27 (my $option = $field) =~ s{_}{-}g;
28 my $value = `uname --$option`;
30 $uname{ $field } = $value;
35 sub _gather_hostname {
37 open my $fh, '<', '/etc/hostname'
38 or die "Unable to read /etc/hostname: $!\n";
50 System::Introspector::Host - Gather generic host information
54 Gathers the hostname and information provided by C<uname>.
60 =item L<System::Introspector>