On Tue, Feb 22, 2005 at 08:35:49PM +0800, Autrijus Tang wrote: > jn Tue, Feb 22, 2005 at 10:54:26AM -0000, Rafael Garcia-Suarez wrote: > > I had this silly idea, to try to add %ENV to pugs. That would be an > > interesting exercise. So I can write CGI scripts. Maybe. But I don't > > know what's the Right way to do it in Perl 6. Any hints ? > > In Perl6 I think you do it by populating the %*ENV hash, when the > script is first run.
This might initially work for read-only access/testing, but in the long run I suspect that %*ENV will be tied directly to the C putenv/getenv calls or their Parrot/other equivalents. Assigning to %*ENV should change the environment for any scripts invoked from Perl 6. (This also eliminates the runtime overhead of "populating %*ENV" when it's not going to be used by a particular script.) Pm