develooper Front page | perl.perl6.language | Postings from April 2005

Junctions of classes, roles, etc.

Thread Next
From:
Ingo Blechschmidt
Date:
April 28, 2005 06:31
Subject:
Junctions of classes, roles, etc.
Message ID:
d4qo3r$dat$1@sea.gmane.org
Hi,

so we had junctions of Code references some days ago, what's with
junctions of Class and Role objects? :)

  role A { method foo() { 42 } }
  role B { method foo() { 23 } }
  class Test does A|B {}
  
  my Test $test .= new;
  my $ret = $test.foo; # 42|23?


  role A {}
  role B { method foo() { 42 } }
  class Test does A|B {}

  my Test $test .= new;
  my $ret = $test.foo; # unthrown-exception undef|42?


--Ingo

-- 
Linux, the choice of a GNU | Knowledge is that which remains when what
generation on a dual AMD   | is learned is forgotten. - Mr. King  
Athlon!                    |


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About