develooper Front page | perl.perl5.porters | Postings from June 2015

[perl #125373] chdir() needs more detail when %ENV gives nothing

From:
Tony Cook via RT
Date:
June 23, 2015 00:25
Subject:
[perl #125373] chdir() needs more detail when %ENV gives nothing
Message ID:
rt-4.0.18-31971-1435019110-1451.125373-15-0@perl.org
On Wed Jun 10 00:25:33 2015, felipe@felipegasper.com wrote:
> If you do:
> 
> {
>     local %ENV;
>     printf "Result: %s\n", chdir();
> }
> 
> ...you get 0 as the result. This doesn’t seem to match “perldoc -f
> chdir”,
> which describes this as a no-op scenario.
> 
> Either the docs should change, or this is a bug? (I suspect the
> former?)

I think the attached covers the issues discussed in this patch:

- quotes SYS$LOGIN
- (briefly) documents that none of the environment variables being set is
  an error
- sets $! on such an error

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=125373



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