Nathan Torkington <[EMAIL PROTECTED]> writes: >Dan Sugalski writes: >> It's possible, for example, for a tied/overloaded/really-darned-strange >> variable to look true but still be false. If you do: >> >> $foo = $bar || $baz; >> >> and both $bar and $baz are objects, the 'naive' way is to make $foo be >> $bar. But it's distinctly possible that $bar really should be treated as a >> false value and $baz be used instead. Why? Dunno. Serious hand-waving here. >> (And yes, I know that's a danger sign... :) But I don't see any reason to >> preclude the possibility. > >You can do that right now in perl5, by using overload.pm and supplying >a 'bool' method. In practice both Damian and I have been bitten by inability to overload || and && - you can indeed pick which side is kept but you cannot make it keep both. So "defered" action is not possible. I can make $a + $b return bless ['+',$a,$b],'OperatorNode' but you cannot get $a && $b to produce bless ['&&',$a,$b],'OperatorNode' whatever you do. -- Nick Ing-Simmons
- other parts of the guts playing wi... Bradley M. Kuhn
- Re: A tentative list of vtable functions Ken Fox
- Re: A tentative list of vtable functions Nick Ing-Simmons
- Re: A tentative list of vtable function... Dan Sugalski
- Re: A tentative list of vtable fun... Ken Fox
- Re: A tentative list of vtable... Nick Ing-Simmons
- Re: A tentative list of vtable... Ken Fox
- Re: A tentative list of vtable... Dan Sugalski
- Re: A tentative list of vtable... Dan Sugalski
- Re: A tentative list of vtable... Nathan Torkington
- Re: A tentative list of vtable... Nick Ing-Simmons
- Re: A tentative list of vtable functions David L. Nicol
- Re: A tentative list of vtable functions Nick Ing-Simmons
- Re: A tentative list of vtable functions Nick Ing-Simmons
- Re: A tentative list of vtable functions Dan Sugalski
- Re: A tentative list of vtable functions David L. Nicol
- Re: A tentative list of vtable functions Dan Sugalski
- Re: A tentative list of vtable functions Chaim Frenkel
- Re: A tentative list of vtable functions Dan Sugalski
- Re: A tentative list of vtable functions Grant M.
- Re: A tentative list of vtable functions Chaim Frenkel