One, the two groups of print statements generate different results. That is, the argv array is getting trounced by the exception handler. (The first prints "a", the second prints "lexical "a" not found")
Two, the program goes into an infinite loop, continually invoking the same RetContinuation.
Is there a bug in my code? (The null exception handler given was cribbed from an early example, is there a better way to say "ignore that exception", perhaps?)
.sub _main $P1 = new PerlArray $P1[0] = "a" __cmd_array($P1) print "done\n" end .end
.sub __cmd_array .param PerlArray argv
$S0= argv[0] print "argv[0]='" print $S0 print "'\n"
.local Exception_Handler ignore newsub ignore, .Exception_Handler, __default_handler
set_eh ignore find_lex $P1, -1, $S0 clear_eh $S1 = argv[0] print "argv[0]='" print $S1 print "'\n"
.pcc_begin_return .pcc_end_return .end
.sub __default_handler P2 = P5["_invoke_cc"] invokecc P2 .end
--
Will "Coke" Coleda will at coleda dot com