1 package System::Introspector::Probe::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;
53 no warnings 'uninitialized';
55 ($a->{device_name} cmp $b->{device_name})
57 ($a->{mount_point} cmp $b->{mount_point})
67 System::Introspector::MountPoints - Gather moint point information
71 Reads C<fstab> and C<mtab> files to provide mount point information.
77 =item L<System::Introspector>