Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CGI.pn: misprint in find_tempdir subroutine [rt.cpan.org #95635] #135

Closed
leejo opened this issue May 22, 2014 · 2 comments
Closed

CGI.pn: misprint in find_tempdir subroutine [rt.cpan.org #95635] #135

leejo opened this issue May 22, 2014 · 2 comments

Comments

@leejo
Copy link
Owner

leejo commented May 22, 2014

https://rt.cpan.org/Ticket/Display.html?id=95635

Hello,

I've found a misprint in the CGI.pm module in find_tempdir subroutine:

4205c4205
<       do {$TMPDIRECTORY = $_; last} if -d $_ && -w _;

---
 >       do {$TMPDIRECTORY = $_; last} if -d $_ && -w $_;

-- 

Best regards,
Maxim Krayushin

e-mail: m.krayushin@net-probe.ru
skype:  voodoovin
web:    www.net-probe.ru
@leejo
Copy link
Owner Author

leejo commented May 22, 2014

mark@stosberg.com - 2014-05-14 12:56:08

< do {$TMPDIRECTORY = $; last} if -d $ && -w _;

  do {$TMPDIRECTORY = $_; last} if -d $_ && -w $_;

The existing code is correct and in fact better because it will run a
bit faster.

If you had creating a test case before you submitted, you would have
seen that the existing code works as expected.

See

perldoc -f -X

And scroll to the bottom to see "_" explained.

 Mark

@leejo
Copy link
Owner Author

leejo commented May 22, 2014

Closing as per reason explained above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant