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: $!";