On 6/28/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
Another question about pdd15...:If I'm in a different HLL namespace (e.g., via a .HLL directive), how do I get a PMC class from the 'parrot' HLL namespace? Here is an example (which obviously won't work): I'm creating a 'perl6;Str' class and then attempting to add (parrot's) String class as a parent. But of course the constant 'String' here refers to the wrong HLL namespace: $ cat z.pir .HLL "perl6", "" .namespace [ "" ] .sub main :main # create 'Str' class $P1 = new 'Class' $P1.'name'('Str') # add parrot;String PMC as a parent class $P2 = get_class 'String' addparent $P1, $P2 .end $ ./parrot z.pir Class 'String' doesn't exist current instr.: 'perl6;;main' pc 12 (z.pir:11) $ Of course, I'm mostly interested in knowing what the answer "should be", but I'm also interested in what "works today".
i've tried attacking this from a number of directions with current functionality, and can't seem to get anything to work. note that this example only works if *both* the .HLL and .namespace lines are commented out. i can't quite figure out why that is, but i'll to stare at the C source a bit and see if something jumps out. ~jerry
