Skip Menu |

This queue is for tickets about the Tangram CPAN distribution.

Report information
The Basics
Id: 2790
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Tangram

People
Owner: SAMV [...] cpan.org
Requestors: pmalves [...] think.pt
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: Pedro Alves <pmalves [...] think.pt>(by way of Sam Vilain <sam [...] vilain.net>)
Subject: [tangram-t2-maintainers] perl 5.8.0 and Possible precedence problem on bitwise & operator at /usr/lib/perl5/site_perl/5.8.0/Tangram/Coll.pm line 194
Date: Thu, 12 Jun 2003 22:14:10 +1200
To: bug-Tangram [...] rt.cpan.org
Hi. Installing 15pre2 with perl 5.8.0 I got this: error: Error during compilation of /home/webdev/mason/veltman/autohandler: Possible precedence problem on bitwise & operator at /usr/lib/perl5/site_perl/5.8.0/Tangram/Coll.pm line 194. context: ... code stack: /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Interp.pm:597 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Interp.pm:332 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Interp.pm:496 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm:320 /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm:314 raw error... Line 194: return $self->includes($remote) & $remote->{id} == $item_id; any tips? -- Pedro Miguel G. Alves pmalves@think.pt THINK - Tecnologias de Informação www.think.pt Tel: +351 21 413 46 00 Av. José Gomes Ferreira Fax: +351 21 413 46 09 nº 13 1495-139 ALGÉS Show quoted text
_______________________________________________ tangram-t2-maintainers mailing list tangram-t2-maintainers@hottub.perlfect.com http://hottub.perlfect.com/mailman/listinfo/tangram-t2-maintainers
Show quoted text
> Line 194: > > return $self->includes($remote) & $remote->{id} == $item_id;
Please try changing this line to: return $self->includes($remote) & ($remote->{id} == $item_id); I think it's probably a harmless warning. Please respond to this message letting me know how you get on!
[pmalves@think.pt - Thu Jun 12 07:51:23 2003]: Show quoted text
> return $self->includes($remote) && ($remote->{id} == $item_id); > > I think it's the same, since $self->includes appears to return only > 0|1
I sure hope `make test' didn't pass with the code as above, that would be a bug in itself :-) It may be syntactically correct, but that function isn't returning logical truth. It's returning a Tangram::Expr object. It's using the bitwise "&" because the logical "&&" is seen by Perl as a language construct, not an operator, and hence not possible to be overloaded via "use overload". Perhaps Perl 5.8 wants the precedence *really* explicitly labelled: return($self->includes($remote) & ($remote->{id} == $item_id));
[pmalves@think.pt - Thu Jun 12 23:35:21 2003]: Show quoted text
> > Perhaps Perl 5.8 wants the precedence *really* explicitly labelled: > > return($self->includes($remote) & ($remote->{id} == $item_id));
> Man, it still doesn't work!! even after *really* explicitly > labelled :/
This should be fixed in Tangram 2.06 with Perl 5.8.1-RC2+