1 package System::Introspector::MountPoints;
4 use System::Introspector::Util qw(
12 mtab => transform_exceptions {
14 => $self->_parse_tab_fh($self->_open_fh('/etc/mtab')) };
16 fstab => transform_exceptions {
18 => $self->_parse_tab_fh($self->_open_fh('/etc/fstab')) };
24 my ($self, $file) = @_;
25 return handle_from_file $file;
31 while (defined( my $line = <$fh> )) {
33 next if $line =~ m{^\s*$}
35 my ($device, $point, $type, $opt, $dump, $pass)
36 = split m{\s+}, $line;
38 device_name => $device,
39 mount_point => $point,
45 my ($name, $value) = split m{=}, $_, 2;
47 unless defined $value;
62 System::Introspector::MountPoints - Gather moint point information
66 Reads C<fstab> and C<mtab> files to provide mount point information.
72 =item L<System::Introspector>