Larry Wall writes:
> But if you say something like:
>
> class DangerousPet does Pet does Predator {
> multi method feed ($x) {...}
> }
>
> then DangerousPet::feed is called only when multimethod dispatch
> would have thrown an exception. Alternately, multi's will probably have
> so
On Fri, Dec 19, 2003 at 12:24:29PM -0700, Luke Palmer wrote:
: Abhijit A. Mahabal writes:
: > On Fri, 19 Dec 2003, Larry Wall wrote:
: >
: > > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
: > > : Of course, when I do:
: > > :
: > > : my $x = 0 but (true|false);
: > > :
: > >
On Mon, Dec 15, 2003 at 07:02:53PM -0800, Jonathan Lang wrote:
: Larry Wall wrote:
: > Jonathan Lang wrote:
: > : Let's see if I've got this straight:
: > :
: > : role methods supercede inherited methods;
: >
: > But can defer via SUPER::
: >
: > : class methods supercede role methods;
: >
: >
Abhijit A. Mahabal writes:
> On Fri, 19 Dec 2003, Larry Wall wrote:
>
> > On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
> > : Of course, when I do:
> > :
> > : my $x = 0 but (true|false);
> > :
> > : then what happens?
> >
> > That's the problem with making them methods. Any
On Fri, 19 Dec 2003, Larry Wall wrote:
> On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
> : Of course, when I do:
> :
> : my $x = 0 but (true|false);
> :
> : then what happens?
>
> That's the problem with making them methods. Any such operational
> definition is going to get y
On Fri, Dec 19, 2003 at 10:23:45AM -0800, Austin Hastings wrote:
: Of course, when I do:
:
: my $x = 0 but (true|false);
:
: then what happens?
That's the problem with making them methods. Any such operational
definition is going to get you in trouble. I think I like them better
as enums, be
On Fri, Dec 19, 2003 at 10:36:01AM -0600, Adam D. Lopresto wrote:
: I've been trying to follow the recent discussion on roles and properties and
: traits and such, but there's something that bugs me. If I understand
: correctly, adding a role at runtime using but won't override any methods
: defin
--- Austin Hastings <[EMAIL PROTECTED]> wrote:
>
> --- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote:
> > #Actually, how do we define this?
> > method asBoolean(Complex $self:){
> > return $self.real || $self.imag;
> > }
> >
> >
> > ...
> >
> >
> > then somewhere in a function
> >
> >
--- "Adam D. Lopresto" <[EMAIL PROTECTED]> wrote:
> I've been trying to follow the recent discussion on roles and
> properties and traits and such, but there's something that bugs me.
I tried for weeks before I could download the "traits paper". I finally
got it this week, and it has clarified s
I've been trying to follow the recent discussion on roles and properties and
traits and such, but there's something that bugs me. If I understand
correctly, adding a role at runtime using but won't override any methods
defined by the class itself (but it will override inherited methods). But then
10 matches
Mail list logo