Andy Dougherty <[EMAIL PROTECTED]> writes:

> I find that I don't remember many of the less-frequently-used perlvars
> (where less-frequently-used depends on the types of programs I write,
> obviously).  I certainly couldn't tell you off-hand the differences
> among $< $> $( and $).  I'd have to look them up.

I never understood why these were variables.  You don't change UIDs or
GIDs that often, and when you do you tend to want precise control and
because they're variables, they have weird interaction semantics and you
have to assign to them in just the right order to get done what you want
to get done.  See recent threads on comp.lang.perl.moderated.

I'd honestly rather see getuid, geteuid, getgid, getegid, and getgroups,
along with some consistent and complete subset of the setting functions
(with portability magic behind the scenes), in a separate module that only
those programs that need to do UID fiddling need to load.

I guess the exception is getpwuid($<), which is probably done more than
any other operation on UIDs, but maybe just keep that single variable.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to