On Fri, 24 Apr 2009, Patrick R. Michaud via RT wrote:
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).
ok, makes sense. it worked before, so i thought something was broken.
turns out it was me. :)
i'm going to have to play some games to get this working correctly when i
precompile my modules, since these classes are created by the mod_parrot
runtime and don't exist at compile-time.
-jeff