Harry Jackson <[EMAIL PROTECTED]> wrote: > Commanlib.imc is where I will build an array to contain all the subs to > call.
> 1 .local PerlArray Command > 2 Command = new PerlArray > 3 > 4 Command[0] = PQCONNECTSTART I'd toss that part that generateds the command array. > 241 .pcc_sub _connect prototyped > 246 > 247 .local PerlArray C > 248 C = new PerlArray > 249 C = Command This doesn't copy the command array, its just gets an alias, i.e. both C and Command point to the original Array. I'd just retrieve the global here. > 251 .local pmc CONN > 252 .local int int_answer > 253 print "About to Connect\n" > 254 P0 = C[0] > 255 S5 = s > 256 invoke > 257 CONN = P5 Calling the sub is something like this (untested): .pcc_begin prototyped .arg dbstring .nci_call PQCONNECTSTART .result CONN .pcc_end > Running this fails with the followng error. > set_string_native() not implemented in class 'PerlArray' If such errors occur it helps to run the code with tracing turned on: $ parrot -t code.imc and to have a look at the generated PASM $ parrot -o- code.imc | less > Harry leo