-
Notifications
You must be signed in to change notification settings - Fork 556
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
Problem in documentation of Fcntl constants #1079
Comments
From warren-odom@stenocall.comAfter a discussion in the perl.misc newsgroup, everyone agreed that the -- Warren |
From [Unknown Contact. See original ticket]
One "adds in" a bit using bitwise OR, not logical OR. --tom |
From [Unknown Contact. See original ticket](copy of message that was sent to Tom Christiansen, in reply to his OK, I was using "logical OR" as a synomym for "bitwise OR." Anyway, first The point is, a literal reading of the documentation (and isn't that how -- Warren -----Original Message-----
One "adds in" a bit using bitwise OR, not logical OR. --tom |
From [Unknown Contact. See original ticket]I think you are overreaching. And Perl has historically expected people to use 1, 2, 4, and 8. It's % perl -le 'use Fcntl ":flock"; print LOCK_SH' Sounds like people are too uptight. Perl is well-defined --tom |
From @RandalSchwartz
Warren> The point is, a literal reading of the documentation (and But it *does* work. You just happened to stumble into a combination 2 + 4 is 2 | 4. Same value. Adding works fine. -- |
From [Unknown Contact. See original ticket]From pp_sys.c: # ifdef FLOCK /* #endif /* no flock() */ fcntl_emulate_flock(int fd, int operation) The values of LOCK_?? are "famous". People pass in 6, and expect it to --tom |
From [Unknown Contact. See original ticket]<<I think you are overreaching....Sounds like people are too uptight.>> Man, now I kinda wish you'd been there to support me in the newsgroup! I <<And Perl has historically expected people to use 1, 2, 4, and 8. It's Well, yes, there are lots of things that mankind did before better solutions But I don't see why any objection would be raised to saying "or" instead of And, again, using addition gives the wrong answer. -- Warren |
From [Unknown Contact. See original ticket]Avoiding the encapsulation vs. expose-the-ductwork debate, the point still *$AUTOLOAD = sub { $val }; causing a working C idiom LOCK_SH + LOCK_NB to fail in Perl. Here's one possible fix against 5.5's Fcntl.pm, if a fix is desired
114c122
131c139
|
From [Unknown Contact. See original ticket]
Warren> The point is, a literal reading of the documentation (and <<But it *does* work. You just happened to stumble into a combination I'm not sure how to respond to this, because your example is not an And since every other Perl reference says use OR, and since it's an -- Warren |
From [Unknown Contact. See original ticket]If a fix is that simple, then great--you have definitely brightened up my -- Warren -----Original Message----- Avoiding the encapsulation vs. expose-the-ductwork debate, the point still *$AUTOLOAD = sub { $val }; causing a working C idiom LOCK_SH + LOCK_NB to fail in Perl. Here's one possible fix against 5.5's Fcntl.pm, if a fix is desired
114c122
131c139
|
From [Unknown Contact. See original ticket]
Oh, I see. Yes, the whole default context coercion prototypes were --tom |
From [Unknown Contact. See original ticket]Warren Odom wrote:
As Tom mentions later, it seems that it shouldn't be necessary. And if Just let me know if it's wanted... - Barrie |
From @gsarOn Tue, 25 Jan 2000 17:45:11 EST, Barrie Slaymaker wrote:
I think the better approach is to make h2xs generate newCONSTSUB() entries Sarathy |
From [Unknown Contact. See original ticket]Gurusamy Sarathy writes:
This in an enormous overhead. Imagine loading a module with 6000 Putting prototypes may be a better solution for largish modules: Ilya |
From @gsarOn Wed, 26 Jan 2000 15:43:22 EST, Ilya Zakharevich wrote:
OK, h2xs should be able to generate those automatically too. That lets Advance thanks to the person who's going to send me the patch. Sarathy |
From [Unknown Contact. See original ticket]Gurusamy Sarathy writes:
I would not *deeply* thank anyone who implements such a botched "Real" autoload would provide a way to get a reference to the Say, a compile-time hook could provide the prototype for the Given the current preference of no-new-magic-uppercase-names, what about use autoload proto => \&get_proto, body => \&get_body; or some such? BTW, return of undef from these subroutines could mean Ilya |
From [Unknown Contact. See original ticket]On Sat, Jan 29, 2000 at 02:05:32AM -0500, Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
Oh yes ;)
modules like the gimp do not know wether a function to autoload exists BTW, it might be even better to have some hook which only _looked_ wether -- |
From [Unknown Contact. See original ticket]Marc Lehmann writes:
Yes, this is body => \&get_body in the above example.
This is exactly proto => \&get_proto. Ilya |
From @schwern
Anyone remember what this bug was all about? I read what information is |
@smpeters - Status changed from 'open' to 'stalled' |
From @gannett-ggreerOn Tue Jul 12 19:51:57 2005, schwern wrote:
This was fixed in ea3105b by Gurusamy "" flock() pod talks about "adding" in the sense of "or-ing" "" It formerly read "If LOCK_NB is added to LOCK_SH..." but now reads "If So this ticket can be closed. http://rt.perl.org/rt3/Ticket/Display.html?id=2032 -- |
The RT System itself - Status changed from 'stalled' to 'open' |
@tonycoz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#2032 (status was 'resolved')
Searchable as RT2032$
The text was updated successfully, but these errors were encountered: