On Thu, Apr 23, 2009 at 09:33:37AM -0700, Jeff Horwitz wrote: > The result is that Foo.new() becomes: > > $P20 = "Foo"() > $P21 = "!dispatch_method"($P20, "new") > > with the out-of-place "Foo"() failing miserably. The offending code can > be easily reproduced using the pir target: > > [j...@groovy rakudo]$ ./perl6 --target=pir > > Foo.new
Rakudo is behaving precisely according to the spec here -- unknown identifiers ("Foo") are presumed to be listops in absence of some other declaration. So, Foo.new above is exactly the same as Foo().new() . In order to get the above to work you'd need a "use Foo;" statement somewhere first, to load the Foo class (and register it in the parser). Pm