1 package System::Introspector::Hosts;
6 default => sub { '/etc/hosts' },
11 my $fh = $self->_open_hosts_file;
13 while (defined( my $line = <$fh> )) {
15 next if $line =~ m{^\s*$}
17 push @hosts, [split m{\s+}, $line];
22 sub _open_hosts_file {
24 my $file = $self->hosts_file;
25 open my $fh, '<', $file
26 or die "Unable to read $file: $!\n";