From: Robert 'phaylon' Sedlacek Date: Tue, 29 May 2012 19:10:14 +0000 (+0000) Subject: made passwd file path configurable X-Git-Tag: v0.001_001~57 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a39ee88fdf3365d65cd229fea68d8db5126db2ef;p=scpubgit%2FSystem-Introspector.git made passwd file path configurable --- diff --git a/lib/System/Introspector/Probe/Users.pm b/lib/System/Introspector/Probe/Users.pm index a80a68d..34886e6 100644 --- a/lib/System/Introspector/Probe/Users.pm +++ b/lib/System/Introspector/Probe/Users.pm @@ -10,6 +10,8 @@ use System::Introspector::Util qw( handle_from_file ); +has passwd_file => (is => 'ro', default => sub { '/etc/passwd' }); + sub gather { my ($self) = @_; return transform_exceptions { @@ -89,7 +91,7 @@ sub _deparse_htpasswd_line { sub _open_passwd_fh { my ($self) = @_; - return handle_from_file '/etc/passwd'; + return handle_from_file $self->passwd_file; } 1;