From: Jeremy Henty Date: 2003-01-04T07:54:41+09:00 Subject: Re: ENV.clear In article , Jeremy Henty (ie. me) wrote: > In article <1041481251.819565.3200.nullmailer@picachu.netlab.jp>, > Yukihiro Matsumoto wrote: > >> "clear" is not supported by ENV, just because I considered removing >> all environment variables might not be intentional. > > Why? When writing Perl scripts in a security-conscious way I often > deleted all environment variables, then set a chosen few (PATH, > typically) to safe values. Is this an unusual thing to want to do? Thinking about it further, in this case I really want ENV to respond to "replace" rather than "clear". Currently (ie. in 1.6.8) it does not. I would argue that ENV.replace is *much* less likely to be unintentional than ENV.clear because although one rarely wants to delete the environment entirely (eg. do you *ever* want an empty PATH?) it is often sensible to reset it to some fixed value. Convinced? Regards, Jeremy Henty