8.165 User::pwent
Overrides core The field names (and therefore the method names) are the same as the names of the fields in the passwd structure from the C file pwd.h : name , passwd , uid , gid , quota , comment , gecos , dir , and shell . You can access the fields either with the methods or by importing the fields into your namespace with the :FIELDS import tag and prependinguse User::pwent; $pw = getpwnam('daemon') or die "No daemon user"; if ( $pw->uid == 1 && $pw->dir =~ m#^/(bin|tmp)?$# ) { print "gid 1 on root dir"; }
pw_
to the method name (for example,
pw_name
).
Exports four functions: |
|