From 35d68a7901ea1fc1f7236e797ed63a85ae26b5ec Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 29 Jun 2010 23:03:15 -0700 Subject: Some forced early evaluation. --- usr/src/libpiny/lib/Piny/User.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr/src/libpiny/lib/Piny') 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 ); }; }; -- cgit v1.2.3