1 package System::Introspector::Probe::ResolvConf;
4 use System::Introspector::Util qw(
9 has resolv_conf_file => (
11 default => sub { '/etc/resolv.conf' },
16 return transform_exceptions {
17 my $fh = $self->_open_resolv_conf_file;
19 while (defined( my $line = <$fh> )) {
21 next if $line =~ m{^\s*$}
23 push @resolv, [split m{\s+}, $line];
25 return { resolv_conf => \@resolv };
29 sub _open_resolv_conf_file {
31 return handle_from_file $self->resolv_conf_file;
40 System::Introspector::ResolvConf - Gather name resolution configuration
44 Reads a C<resolv.conf> file to gather information about name resolution.
48 =head2 resolv_conf_file
50 The path to the C<resolv.conf> file that should be read. Defaults to
57 =item L<System::Introspector>