-
Notifications
You must be signed in to change notification settings - Fork 561
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
Not a bug, but did perl really mean that? #40
Comments
From [email protected]Truth in perl can be a problem when dealing with bitwise operators. If we want to work with pipes, we play with select() a lot. pipe(A,B); # Setup pipes, fork, etc. vec($ready_a, fileno(A), 1) = 1; #Get ready for select select($rout=$rin, undef, undef, 10); In C, if we want to see if a particular selector is set, we can say: if ($rout & $ready_a) { # do something useful } We can't do this in perl because the return of ($rout & $ready_a) This can be gotten around by saying: Unfortunately, I don't know if this is good for 100% of the cases Trying to evaluate things in a numeric context using == doesn't What would be most useful is, when dealing with vectors, to I realize that using the bitcounting operator is a useful workaround, -- |
From [Unknown Contact. See original ticket]Jeff, You pointed out that a string consisting of \0 bytes isn't false, I've marked the bugreport as closed. Cheers; Nat |
From [Unknown Contact. See original ticket]
I don't think that that does what you wish it did. open(NEWFH, ">/dev/null") || die $!; Prints "No bits here." See why? :-) --tom |
From [Unknown Contact. See original ticket]Tom Christiansen writes:
Oh bollocks. Change the regexp: Thanks for pointing that out, Tom. Nat |
From @tamiasOn Mon, Mar 20, 2000 at 09:20:23PM -0700, Nathan Torkington wrote:
I think that should be \z. \Z can also match before a newline. Ronald |
From [Unknown Contact. See original ticket]Ronald J Kimball writes:
That's it, I'm taking up Python. Nat |
From [Unknown Contact. See original ticket]
That's right. That's why I, and even moreso Greg, went it and fixed a --tom |
From [Unknown Contact. See original ticket]On Mar 20, Nathan Torkington said:
Yeah, good idea. Quadruple backslash to get a single backslash in a -- |
From [Unknown Contact. See original ticket]Tom Christiansen wrote:
Only when using \A. There is no need for \A in /\Ablah\z/ since it is /^blah\z/ I find the lack of symmetry here makes the intent clearer. -- |
From [Unknown Contact. See original ticket]
That's not correct. $* may be set. --tom |
From [Unknown Contact. See original ticket]Tom Christiansen wrote:
print "The meaning of deprecated in perl is ", Set $[ appropriately. -- |
From [Unknown Contact. See original ticket]
No, that's not the same. --tom |
From [Unknown Contact. See original ticket]Tom Christiansen wrote:
You are correct. Does it not make more sense to remove such -- |
From [Unknown Contact. See original ticket]
One does what one can, as one can. Right now, one can code --tom |
From [Unknown Contact. See original ticket]Tom Christiansen wrote:
And that is appreciated.
I see no reason to ever go there. IMHO, it is time for $* to retire -- |
From [Unknown Contact. See original ticket]Is this right? % P -MO=Showlex,retval -e 'sub retval { my $self = shift; my $n = sub { my $arg = shift; return $self->{$arg} } } ' What's all that well, stuff? And what's the thing whose name is % P -MO=Xref -e 'sub retval { my $self = shift; my $n = sub { my $arg = shift; return $self->{$arg} } } ' Here are more. % perl -MO=Showlex /tmp/testit % perl -MO=Showlex,start /tmp/testit That was from this guy that you saw before: % cat /tmp/testit --tom |
From [Unknown Contact. See original ticket]
...
.... Note that those two, at least, are not platform specific. --tom |
From [Unknown Contact. See original ticket]
Well, I've heard nothing, so here's the patch that implements this. Inline Patch--- perl5db.pl-presig Tue Mar 14 18:42:13 2000
+++ perl5db.pl Wed Mar 15 06:23:49 2000
@@ -346,16 +346,24 @@
return 1;
}
-if (-f $rcfile) {
- safe_do("./$rcfile");
-}
-elsif (defined $ENV{HOME} && -f "$ENV{HOME}/$rcfile") {
+{
+ my @sb; # stat buff to check duplicate loading
+ if (defined $ENV{HOME} && -f "$ENV{HOME}/$rcfile") {
+ @sb = stat(_);
safe_do("$ENV{HOME}/$rcfile");
-}
-elsif (defined $ENV{LOGDIR} && -f "$ENV{LOGDIR}/$rcfile") {
+ }
+ elsif (defined $ENV{LOGDIR} && -f "$ENV{LOGDIR}/$rcfile") {
+ @sb = stat(_);
safe_do("$ENV{LOGDIR}/$rcfile");
-}
+ }
+ if (-f $rcfile) {
+ if (@sb && $sb[0] != (stat _)[0] && $sb[1] != (stat _)[1]) {
+ safe_do("./$rcfile");
+ }
+ }
+
+}
if (defined $ENV{PERLDB_OPTS}) {
parse_options($ENV{PERLDB_OPTS});
} |
How long has it been, dear god. |
On Fri, Mar 08, 2024 at 05:07:30PM -0800, dao.rixing wrote:
How long has it been, dear god.
How long has *what* been? What exactly are you trying to contribute to, or
a complain about, in relation to this long-closed ticket?
…--
All wight. I will give you one more chance. This time, I want to hear
no Wubens. No Weginalds. No Wudolf the wed-nosed weindeers.
-- Life of Brian
|
Migrated from rt.perl.org#842 (status was 'resolved')
Searchable as RT842$
The text was updated successfully, but these errors were encountered: