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
From:
Abhijit Menon-Sen
Date:
August 31, 2001 18:05
Subject:
Re: [PATCH op.c op.h pp_sys.c t/op/local.t pod/perlfunc.pod] local chdir()
Message ID:
20010901063450.B25124@lustre.dyn.wiw.org
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About