develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH op.c op.h pp_sys.c t/op/local.t pod/perlfunc.pod] local chdir()

Thread Previous | Thread Next
Abhijit Menon-Sen
August 31, 2001 18:05
Re: [PATCH op.c op.h pp_sys.c t/op/local.t pod/perlfunc.pod] local chdir()
Message ID:
At 2001-08-31 19:38:10, 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,

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About