1 package System::Introspector::Probe::Groups;
4 use System::Introspector::Util qw(
11 return transform_exceptions {
13 my $fh = $self->_open_group_file;
14 while (defined( my $line = <$fh> )) {
16 next if !(length $line);
17 my ($name, undef, $gid, $users) = split m{:}, $line;
18 $users = length($users)
19 ? [split m{,}, $users]
27 return { groups => \%group };
31 sub _open_group_file {
33 return handle_from_file '/etc/group';
42 System::Introspector::Probe::Groups - Gather group information
46 Uses C</etc/group> to gather information about groups.
52 =item L<System::Introspector>
58 Copyright (c) 2012 the L<System::Introspector>
59 L<AUTHOR|System::Introspector/AUTHOR>,
60 L<CONTRIBUTORS|System::Introspector/CONTRIBUTORS> and
61 L<SPONSORS|System::Introspector/SPONSORS>.
65 This library is free software and may be distributed under the same terms