--- Garrett Goebel <[EMAIL PROTECTED]> wrote:
> Larry Wall wrote:
> > I think the switch statement will have to recognize any
> > Class::Name known at compile time, and force it to call
> > $!.isa(Class::Name).
> 
> Don't you mean the case/when statement? Wouldn't you want the
> following to
> work:
> 
> for @obj {
>   when Dog { ... }
>   when Cat { ... }
> }
> 
To make matters worse, what's the test sequnce?

If I have classes 'X' and 'Y', and a method Y::X, 

my Y $y;

given $y {
  when X { ... }
}

Does that evaluate true (because of $a.$b() rule) or not (because of
$a.isa($b)) rule, or does it try both?

If so, in what order? 

And can we use

when .X { ... }

instead, to make clear that it's a method test and not an isa test?

=Austin




__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

Reply via email to