Re: More trees and roles

2009-02-20 Thread Larry Wall
On Fri, Feb 20, 2009 at 05:11:31PM +0100, TSa wrote: > I'm unsure if the method dispatcher still falls back to subs, It doesn't do that anymore, as it happens. You mark methods with "is export" if you want that, and they automatically show up as both multis and methods in any lexical scope that u

Re: More trees and roles

2009-02-20 Thread TSa
HaloO, Daniel Ruoso wrote: Em Sex, 2009-02-20 às 11:19 +1100, Timothy S. Nelson escreveu: if(! defined($footree.root)) { warn "Unrooted tree"; } There are some other very interesting possibilities: unless ($footree.can(root)) { warn "Unrooted tree"; } or even better unless ($fo

Re: More trees and roles

2009-02-20 Thread Daniel Ruoso
Em Sex, 2009-02-20 às 11:19 +1100, Timothy S. Nelson escreveu: > if(! defined($footree.root)) { warn "Unrooted tree"; } There are some other very interesting possibilities: unless ($footree.can(root)) { warn "Unrooted tree"; } or even better unless ($footree ~~ RootedTree) { warn "Unr