1 package System::Introspector::ResolvConf;
4 has resolv_conf_file => (
6 default => sub { '/etc/resolv.conf' },
11 my $fh = $self->_open_resolv_conf_file;
13 while (defined( my $line = <$fh> )) {
15 next if $line =~ m{^\s*$}
17 push @resolv, [split m{\s+}, $line];
22 sub _open_resolv_conf_file {
24 my $file = $self->resolv_conf_file;
25 open my $fh, '<', $file
26 or die "Unable to read $file: $!";
36 System::Introspector::ResolvConf - Gather name resolution configuration
40 Reads a C<resolv.conf> file to gather information about name resolution.
44 =head2 resolv_conf_file
46 The path to the C<resolv.conf> file that should be read. Defaults to
53 =item L<System::Introspector>