Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A script that breaks the p6 debugger.
use v6;
my $fake_OUT = class {method print(*@args) {}};
my $real_OUT = $*OUT;
sub quiet () { $*OUT = $fake_OUT }
sub speak () { $*OUT = $real_OUT }
say 'a';
quiet;
say 'b';
speak;
say 'c';
>>> LOADING scratch/test.p6
+ scratch/test.p6 (3 - 7)
|
|
| my $fake_OUT = class {method print(*@args) {}};
| my $real_OUT = $*OUT;
|
>
+ scratch/test.p6 (4 - 8)
|
| my $fake_OUT = class {method print(*@args) {}};
| my $real_OUT = $*OUT;
|
| sub quiet () { $*OUT = $fake_OUT }
>
+ scratch/test.p6 (9 - 13)
| sub speak () { $*OUT = $real_OUT }
|
| say 'a';
| quiet;
| say 'b';
>
a
+ scratch/test.p6 (10 - 14)
|
| say 'a';
| quiet;
| say 'b';
| speak;
>
+ scratch/test.p6 (6 - 10)
| my $real_OUT = $*OUT;
|
| sub quiet () { $*OUT = $fake_OUT }
| sub speak () { $*OUT = $real_OUT }
|
>
Method 'flush' not found for invocant of class '<anon>'
current instr.: 'prompt' pc 13709 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5218) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:271)
called from Sub '' pc 14288 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5470) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:283)
called from Sub 'issue_prompt' pc 14129 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5388) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:279)
called from Sub '' pc 3054 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:1238) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:493)
called from Sub 'unhandled' pc 2687 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:1103) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:489)
called from Sub 'prompt' pc 13709 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5218) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:271)
called from Sub '' pc 14288 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5470) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:283)
called from Sub 'issue_prompt' pc 14129 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:5388) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:279)
called from Sub '' pc 1293 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:518) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:412)
called from Sub '' pc 1189 (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pir:480) (/home/userx/.perl6/_git/rakudo-star-2012.09/install/lib/parrot/4.6.0/languages/perl6/lib/Debugger/UI/CommandLine.pm:410)
called from Sub '' pc 386 ((file unknown):149720902) (scratch/test.p6:12)
called from Sub '' pc 14 ((file unknown):149720782) (scratch/test.p6:1)
called from Sub '' pc 29466 (src/stage2/gen/NQPHLL.pir:11147) (src/stage2/gen/NQPHLL.pm:1219)
called from Sub 'eval' pc 29318 (src/stage2/gen/NQPHLL.pir:11086) (src/stage2/gen/NQPHLL.pm:1206)
called from Sub 'evalfiles' pc 31784 (src/stage2/gen/NQPHLL.pir:12096) (src/stage2/gen/NQPHLL.pm:1419)
called from Sub 'command_eval' pc 30756 (src/stage2/gen/NQPHLL.pir:11695) (src/stage2/gen/NQPHLL.pm:1361)
called from Sub 'command_eval' pc 439 (src/gen/perl6-compiler.pir:201) (src/Perl6/Compiler.nqp:18)
called from Sub 'command_line' pc 30040 (src/stage2/gen/NQPHLL.pir:11427) (src/stage2/gen/NQPHLL.pm:1304)
called from Sub 'MAIN' pc 792 (modules/rakudo-debugger/perl6-debug.pir:279) (modules/rakudo-debugger/bin/perl6-debug.nqp:373)
called from Sub '' pc 208 (modules/rakudo-debugger/perl6-debug.pir:94) (modules/rakudo-debugger/bin/perl6-debug.nqp:1)
shell returned 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.