Re: No overload magic

[prev] [thread] [next] [Date index for 2005/02/18]

From: Tony Bowden
Subject: Re: No overload magic
Date: 08:21 on 18 Feb 2005
On Fri, Feb 18, 2005 at 01:43:59AM -0500, Michael G Schwern wrote:
> > As far as I know == still works this way. The original poster was 
> > expecting > to be the same, which at the moment it isn't.
> Why would only == be overloaded?  Why not just do <=> and let the fallback
> behaviors take care of the rest?  Though perhaps I answered my own question
> below...

It's not.

The only things overloaded are "" and bool. It's fallback that's dealing
with equality.

  use overload
    '""'     => sub { shift->stringify_self },
    bool     => sub { not shift->_undefined_primary },
    fallback => 1;

I don't think adding explicit overloading for equality is that sensible.
Overloading > seems like pure madness.

Tony

No overload magic
Karjala 07:55 on 16 Feb 2005

Re: No overload magic
Karjala 08:01 on 16 Feb 2005

Re: No overload magic
William Ross 10:05 on 16 Feb 2005

Re: No overload magic
Michael G Schwern 11:25 on 16 Feb 2005

Re: No overload magic
Tony Bowden 14:10 on 16 Feb 2005

Re: No overload magic
William Ross 14:20 on 17 Feb 2005

Re: No overload magic
Michael G Schwern 06:43 on 18 Feb 2005

Re: No overload magic
Tony Bowden 08:21 on 18 Feb 2005

Re: No overload magic
Tim Bunce 09:43 on 18 Feb 2005

Re: No overload magic
Karjala 11:57 on 16 Feb 2005

Re: No overload magic
William Ross 13:52 on 16 Feb 2005

Re: No overload magic
Karjala 14:09 on 16 Feb 2005

Re: No overload magic
Michele Valzelli 11:59 on 16 Feb 2005

Re: No overload magic
Ofer Nave 21:53 on 16 Feb 2005

Re: No overload magic
Ken.Olstad 22:00 on 16 Feb 2005

Generated at 11:20 on 20 Feb 2005 by mariachi v0.52