[STD] Clear $*IN_DECL in body of packageoids so package Foo { $frog++ } fails
[pugs.git] / src / perl6 / tloop
bloba89f3ad0bb83b4ed019bd803606b16f2e6cfcafd
1 #!/usr/bin/env perl
2 use 5.10.0;
4 use FindBin;
5 BEGIN { unshift @INC, $FindBin::Bin if -s "$FindBin::Bin/STD.pmc"; }
7 BEGIN { $ENV{STD5DEBUG} = -1; }
8 use STD;
9 use utf8;
10 use YAML::XS;
11 use Encode;
12 use Term::ReadLine;
13 my $term = new Term::ReadLine 'STD non-repl';
14 my $prompt = " ";
15 my $OUT = $term->OUT || \*STDOUT;
16 while ( defined ($_ = $term->readline($prompt)) ) {
17 my $text = Encode::decode("UTF-8", $_);
18 my $r = eval { STD->parse($text) };
19 print $@ if $@;
20 say "ok" if $r;
21 say "\n\n\n";
22 $term->addhistory($_) if /\S/;