develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [perl #53550] Overload and fallback binary or (|)

Thread Previous | Thread Next
Rafael Garcia-Suarez
April 30, 2008 09:01
Re: [perl #53550] Overload and fallback binary or (|)
Message ID:
2008/4/30 via RT Bram <>:
>  Shouldn't the fallback of the binary or use the overloaded 0+ instead
>  of the overloaded ""?

Well, binary logical operators work on strings and on numbers. Which
is a source of problems in perl. (and also why one should really not
rely on fallback for those) I suggest a little note in to
document the state with overload and logical ops as a potential
gotcha, but I don't think we can do better.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About