Wednesday, May 6, 2009

I tried to use my fancy Perl 6 smart search-and-replace from TextMate in the wee hours this morning, only to have my selected code replaced by the following block of text:
prefix:<=> has been superseeded by $handle.lines and $handle.get
current instr.: 'die' pc 17498 (src/builtins/control.pir:225)
called from Sub 'prefix:=' pc 7076 (src/classes/IO.pir:58)
called from Sub '_block14' pc 157 (EVAL_18:77)
called from Sub '!UNIT_START' pc 19469 (src/builtins/guts.pir:380)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950 (src/PCT/HLLCompiler.pir:529)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1275 (src/PCT/HLLCompiler.pir:690)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1470 (src/PCT/HLLCompiler.pir:791)
called from Sub 'parrot;Perl6;Compiler;main' pc 24292 (perl6.pir:164)

Whoops! Guess this is the first time I ran the script since updating to the latest Perl 6.

I hadn't really thought of what would happen if I got a compiler error running a script, but really, this is a pretty happy way for it to work -- complete error message where it cannot be missed, and all I had to do was hit command-Z to get my code back. Also, this is a great error message, because it told me exactly what I needed to fix my code and get it running again.

No comments:

Post a Comment