At 2001-08-31 19:38:10, schwern@pobox.com wrote: > > Here it is. A complete, documented C<local chdir($dir)> based on > crab's code patch. That patch was never intended for inclusion. It was a quick, fun hack[1], but it isn't something even I would want to see in the core. > I plan to do similar things to single-arg select() and umask(). Please, don't. I'm not convinced that we should allow localizing actions (as opposed to values), and adding destructors piecemeal for random ops would make me very uncomfortable. That said, I wouldn't object to a module which -- with suitable hooks in the core -- allowed arbitrary leave_scope() actions to be registered. I might even write it sometime. - ams [1] Just for the record, it had a bug. In Perl_mod(), i should have really been doing "if (type == 0) ... else goto nomod;" (Thanks, Simon.)Thread Previous | Thread Next