From: Chris Nehren Date: Tue, 7 Aug 2012 19:24:27 +0000 (+0000) Subject: Make the gruop parser handle blank lines in /etc/group X-Git-Tag: v0.001_001~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=86b38d95e972b3dc0b48c458908760d433806128;p=scpubgit%2FSystem-Introspector.git Make the gruop parser handle blank lines in /etc/group --- diff --git a/lib/System/Introspector/Probe/Groups.pm b/lib/System/Introspector/Probe/Groups.pm index aa205ae..abdbb7c 100644 --- a/lib/System/Introspector/Probe/Groups.pm +++ b/lib/System/Introspector/Probe/Groups.pm @@ -13,6 +13,7 @@ sub gather { my $fh = $self->_open_group_file; while (defined( my $line = <$fh> )) { chomp $line; + next if !(length $line); my ($name, undef, $gid, $users) = split m{:}, $line; $users = length($users) ? [split m{,}, $users]