summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2010-06-29 23:03:15 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2010-06-29 23:03:15 -0700
commit35d68a7901ea1fc1f7236e797ed63a85ae26b5ec (patch)
treefb9c62d0ad295365a2aa97578fdfed562d741099
parentc3d48a537993e4d5c1197634ea3b42d1a28a8795 (diff)
downloadpiny-code-35d68a7901ea1fc1f7236e797ed63a85ae26b5ec.tar.gz
piny-code-35d68a7901ea1fc1f7236e797ed63a85ae26b5ec.zip
Some forced early evaluation.
-rw-r--r--usr/src/libpiny/lib/Piny/User.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/src/libpiny/lib/Piny/User.pm b/usr/src/libpiny/lib/Piny/User.pm
index f13d03c..06226cb 100644
--- a/usr/src/libpiny/lib/Piny/User.pm
+++ b/usr/src/libpiny/lib/Piny/User.pm
@@ -98,7 +98,11 @@ sub all_users {
while ( my @info = getpwent( ) ) {
eval {
- push( @ret, $class->new( uid => $info[2] ) );
+ my $user = $class->new( uid => $info[2] );
+ # Some forced early evaluation, so error checking happens now.
+ $user->username( );
+ $user->email( );
+ push( @ret, $user );
};
};