1 package System::Introspector::Probe::Host;
4 use System::Introspector::Util qw(
13 return transform_exceptions {
15 hostname => $self->_gather_hostname,
16 uname => $self->_gather_uname_info,
32 sub _gather_uname_info {
35 for my $field (@UnameFields) {
36 (my $option = $field) =~ s{_}{-}g;
37 my $value = output_from_command [uname => "--$option"];
39 $uname{ $field } = $value;
44 sub _gather_hostname {
46 my $hostname = output_from_file '/etc/hostname';
48 $hostname =~ s{(?:^\s+|\s+$)}{}g;
58 System::Introspector::Host - Gather generic host information
62 Gathers the hostname and information provided by C<uname>.
68 =item L<System::Introspector>