Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.348.464 Times

User::pwent 5.8.8

  Date Added: November 17, 2010  |  Visits: 644

User::pwent

Report Broken Link
Printer Friendly Version


Product Homepage
Download (102 downloads)



User::pwent is a Perl interface getpw*() functions. SYNOPSIS use User::pwent; $pw = getpwnam(daemon) || die "No daemon user"; if ( $pw->uid == 1 && $pw->dir =~ m#^/(bin|tmp)?z#s ) { print "gid 1 on root dir"; } $real_shell = $pw->shell || /bin/sh; for (($fullname, $office, $workphone, $homephone) = split /s*,s*/, $pw->gecos) { s/&/ucfirst(lc($pw->name))/ge; } use User::pwent qw(:FIELDS); getpwnam(daemon) || die "No daemon user"; if ( $pw_uid == 1 && $pw_dir =~ m#^/(bin|tmp)?z#s ) { print "gid 1 on root dir"; } $pw = getpw($whoever); use User::pwent qw/:DEFAULT pw_has/; if (pw_has(qw[gecos expire quota])) { .... } if (pw_has("name uid gid passwd")) { .... } print "Your struct pwd has: ", scalar pw_has(), "n"; This modules default exports override the core getpwent(), getpwuid(), and getpwnam() functions, replacing them with versions that return User::pwent objects. This object has methods that return the similarly named structure field name from the Cs passwd structure from pwd.h, stripped of their leading "pw_" parts, namely name, passwd, uid, gid, change, age, quota, comment, class, gecos, dir, shell, and expire. The passwd, gecos, and shell fields are tainted when running in taint mode. You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your core functions.) Access these fields as variables named with a preceding pw_ in front their method names. Thus, $passwd_obj->shell corresponds to $pw_shell if you import the fields. The getpw() function is a simple front-end that forwards a numeric argument to getpwuid() and the rest to getpwnam(). To access this functionality without the core overrides, pass the use an empty import list, and then access function functions with their full qualified names. The built-ins are always still available via the CORE:: pseudo-package..

Requirements: No special requirements
Platforms: Linux
Keyword: Dir Libraries Name Passwd Programming Pw Shell Uid Userpwent
Users rating: 0/10

License: Freeware Size: 12.2 MB
USER REVIEWS
More Reviews or Write Review


USER::PWENT RELATED
Programming  -  devkitPro 1.5.7
This project is for homebrew console development tools based on the gnu compiler collection with additional tools and libraries to aid programming each supported console. The windows variants are built with MinGW.
444.26 KB  
Shell & Desktop  -  Closebracket 0.0.4
Closebracket let you define multiple shell actions in a single command to speed up the typing of the most repetitive shell commands. The command name of Closebracket is `] and `][, thats because these characters are near the "Enter" key and it is...
8.19 KB  
Libraries  -  GODI 20060118
GODI library provides an advanced programming environment for the Objective Caml (OCaml) language. From INRIA (who created OCaml) you can get the OCaml compiler and runtime system, but this is usually not enough to develop applications. You also...
1.5 MB  
Libraries  -  User::grent 5.8.8
User::grent is an interface to Perls built-in getgr*() functions. SYNOPSIS use User::grent; $gr = getgrgid(0) or die "No group zero"; if ( $gr->name eq wheel && @{$gr->members} > 1 ) { print "gid zero name wheel, with other members"; }...
12.2 MB  
Business  -  Lp4all 0.9.2
Lp4all is a modern and efficient yet simple literate programming tool. According to Wikipedia, Literate programming is the writing of computer programs primarily for human beings to read, similar to a work of literature; hence the name literate...
23.55 KB  
Libraries  -  Class::Maker 0.05.18
Class::Maker Perl module contains classes, reflection, schema, serialization, attribute- and multiple inheritance. SYNOPSIS use Class::Maker qw(class); class Human, { isa => [qw( ParentClass )], public => { string => [qw(name lastname)],...
49.15 KB  
Shell Enhancements  -  IconViewer 2.0
IconViewer is a freeware product developed by Bot Productions. It is a utility that allows you to view the icons contained within files, such as executable files and dynamic link libraries (DLLs). IconViewer is a shell extension, a plugin for...
248 KB  
Network & Internet  -  Simpy Tools 1.1
SimpyTools is a collection of various software for using and enhancing the simpy.com social bookmarking service. Simpy Tools includes libraries in various programming languages for using the REST API of simpy.com. It also includes a Firefox...
17.41 KB  
Modules  -  Saved Pages 5.x-1.1
This module provides a block that can be enabled on the site and through that block users are able to save any page (URL) on your site they have access to. Install the module and enable the provided block.The module creates a form in a block with...
10 KB  
Programming  -  Robot Framework 2.5.7
Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach. Its testing capabilities can...
1.64 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB