develooper Front page | perl.perl6.internals | Postings from March 2006

FYI: HLL-mapped .Sub PMCs (r11852)

From:
Leopold Toetsch
Date:
March 10, 2006 04:16
Subject:
FYI: HLL-mapped .Sub PMCs (r11852)
Message ID:
44116E05.2060803@toetsch.at
Hi all,

now the following should work:

   .HLL       "Foo", "Foo_group"
   .HLL_map   .Sub,  .FooSub

   .sub foo   # typeof gives 'FooSub'
   ...

(given that the HLL 'Foo' has defined a 'FooSub', which C<isa> Sub [1])

Closures and coroutines should be mappable too now.

There is one test[2], which is showing that at least a subroutine of the 
correct type is created but not more.

(Success) usage stories with existing HLLs welcome,
leo

[1] more precisely: it has to be a PMC, which extends Sub, overriding 
this type from PIR doesn't work due to different data layout)

[2] t/dynpmc/sub.t




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