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 uses the class in question. Or you write a sub that calls the corresponding method. But this all lexically scoped by default so that we retain compile-time knowledge of what language is currently defined, including multi definitions. To call a global/contextual sub you actually have to say something like: GLOBAL::globalsub() &*globalsub() The core built-ins are imported into the CORE lexical scope, not into GLOBAL. CORE is the default setting (aka prelude) of the current compilation unit. Unlike languages which call it a prelude, we call it a setting because it's considered a lexical scope *outside* of the compilation unit (and because it can place things like loops around the compilation unit like the -p and -n switches do in Perl 5). Anyway, we're trying to maximize flexibility while also giving the compiler as much information as possible to feed the optimizer. So fallbacks are not in vogue these days. Larry