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
IO::Tty: if(defined BAREWORD) is always true #7543
Comments
From tex@gblx.net Included is a message I sent to the Expect.pm list regarding the In order to recreate the bug, TIOCSCTTY must not be defined. This After building IO::Tty, make test will warn "warning: TIOCSCTTY failed" IO::Tty version was 1.02, I've recreated this on a couple systems Please let me know if there is anything I can do to help fix Thanks muchly, Austin ----- Forwarded message from Austin Schutz <tex@off.org> -----
----- End forwarded message ----- |
From nick@ing-simmons.netAustin Schutz <perl5-porters@perl.org> writes:
If TIOSCTTY isn't a constant sub it is a bareword i.e. a string. if (defined("TIOSCTTY")) ands strings are always defined. I think it should be written as if (defined(&TIOSCTTY) && TIOSCTTY())
|
The RT System itself - Status changed from 'new' to 'open' |
From tex@off.orgOn Tue, Oct 19, 2004 at 01:21:52PM -0000, Nick Ing-Simmons via RT wrote:
It is a constant sub.
The behavior is not consistent between older and newer perls. But Austin
|
From tex@off.org
Err, sorry, no coffee yet. I don't think it's a constant sub, it's Austin |
From @jkeenanOn Tue Oct 19 17:21:50 2004, tex@off.org wrote:
Discussion in this RT petered out nearly eight years ago, and ni-s has Thank you very much. |
From @doyOn Sat, May 26, 2012 at 06:52:22PM -0700, James E Keenan via RT wrote:
The changes in IO::Tty 1.03 look possibly relevant here. -doy |
From @jkeenanOn Thu May 31 15:16:07 2012, doy@tozt.net wrote:
They do look relevant, but they don't help with respect to writing a Thank you very much. |
@dcollinsn - Status changed from 'open' to 'stalled' |
From @dcollinsnRequestor suggests that we edit our system headers to #undef TIOCSCTTL in order to reproduce. Because apparently I like breaking my everything, I tried it. Among other configurations, I tried to build and test IO::Tty 1.02 on perl 5.8.4. Makefile.PL detected that TIOCSCTTL was undefined on my system, make test passed, and there were no errors related to TIOCSCTTL. I even instrumented Pty.pm: At line 118, TIOCSCTTL is undef according to Data::Dumper, and the program does not execute the body of the `if (defined TIOCSCTTL)`. I did try re#defining TIOCSCTTL to 0 in my system headers. Data::Dumper now agrees that TIOCSCTTL is 0, and since 0 is defined, I get the behavior Austin reports. Similarly, #defining it to "" gives that behavior. In both cases, the symbol is defined to something that ioctl doesn't know what to do with. Garbage in, garbage out. |
@dcollinsn - Status changed from 'stalled' to 'rejected' |
Migrated from rt.perl.org#32032 (status was 'rejected')
Searchable as RT32032$
The text was updated successfully, but these errors were encountered: