Dir-List
view release on metacpan or search on metacpan
lib/Dir/List.pm view on Meta::CPAN
# UID is number four in stat
return (stat($arg))[4];
}
# Helper function to retrieve the userinformation for a uid
sub getuserinfo($) {
my $self = shift;
my $arg = shift;
# If it's allready cached (within' this process/instance), don't ask the system again
unless(defined $self->{uid_cache}->{$arg}) {
my($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid($arg);
# Save the information to our current instance (caching).
$self->{uid_cache}->{$arg} = {
name => $name,
passwd => $passwd,
uid => $uid,
gid => $gid,
quota => $quota,
comment => $comment,
gcos => $gcos,
( run in 0.241 second using v1.01-cache-2.11-cpan-8d75d55dd25 )