Skip to content

Commit a8ce6fb

Browse files
committed
Use 'Perl5' as consistent name for EVAL and use :from
1 parent a8a86ef commit a8ce6fb

File tree

13 files changed

+52
-52
lines changed

13 files changed

+52
-52
lines changed

S01-perl-5-integration/array.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
plan 17;
66

7-
unless (try { EVAL("1", :lang<perl5>) }) {
7+
unless (try { EVAL("1", :lang<Perl5>) }) {
88
skip-rest;
99
exit;
1010
}
@@ -50,9 +50,9 @@ sub push {
5050
}
5151
5252
1;
53-
/, :lang<perl5>);
53+
/, :lang<Perl5>);
5454

55-
my $p5ar = EVAL('sub { My::Array->new($_[0]) }', :lang<perl5>);
55+
my $p5ar = EVAL('sub { My::Array->new($_[0]) }', :lang<Perl5>);
5656
my @array = (5,6,7,8);
5757
my $p5array = $p5ar($@array);
5858

S01-perl-5-integration/basic.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ use v6;
22
use Test;
33
plan 15;
44

5-
unless (try { EVAL("1", :lang<perl5>) }) {
5+
unless (try { EVAL("1", :lang<Perl5>) }) {
66
skip-rest;
77
exit;
88
}
99

1010
{
11-
my $r = EVAL("0", :lang<perl5>);
11+
my $r = EVAL("0", :lang<Perl5>);
1212
is($r, 0, "number");
1313
}
1414

1515
{
16-
my $r = EVAL("2", :lang<perl5>);
16+
my $r = EVAL("2", :lang<Perl5>);
1717
is($r, 2, "number");
1818
}
1919

2020
{
21-
my $r = EVAL('"perl6 now"', :lang<perl5>);
21+
my $r = EVAL('"perl6 now"', :lang<Perl5>);
2222
is($r, 'perl6 now', "string");
2323
}
2424

25-
my $p5_dumper = EVAL('sub {return(wantarray ? @_ : $_[0]); }', :lang<perl5>);
25+
my $p5_dumper = EVAL('sub {return(wantarray ? @_ : $_[0]); }', :lang<Perl5>);
2626

2727
my %h = ( a => 1 );
2828

@@ -72,7 +72,7 @@ my $s = 'str';
7272
my $test = q{ (&p6func) Passing a Perl 6 coderef to Perl 5 };
7373

7474
sub plus_one (Int $int) { $int+1 }
75-
my $sub = EVAL('sub { my $p6_coderef = shift; $p6_coderef->(3) }', :lang<perl5>);
75+
my $sub = EVAL('sub { my $p6_coderef = shift; $p6_coderef->(3) }', :lang<Perl5>);
7676
my $result = $sub(&plus_one);
7777
is($result,4,$test);
7878
}

S01-perl-5-integration/class.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
plan(3);
66

7-
unless (try { EVAL("1", :lang<perl5>) }) {
7+
unless (try { EVAL("1", :lang<Perl5>) }) {
88
skip-rest;
99
exit;
1010
}

S01-perl-5-integration/context.t

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ my &p5_void := EVAL(
88
} else {
99
$::got_void = 1;
1010
}
11-
}',:lang<perl5>);
11+
}',:lang<Perl5>);
1212

1313
p5_void(:context<void>);
14-
is(EVAL(:lang<perl5>,'$::got_void'),1,":contex<void> sets void context");
14+
is(EVAL(:lang<Perl5>,'$::got_void'),1,":contex<void> sets void context");
1515
p5_void(:context<scalar>);
16-
is(EVAL(:lang<perl5>,'$::got_void'),0,":contex<scalar> dosn't set void context");
16+
is(EVAL(:lang<Perl5>,'$::got_void'),0,":contex<scalar> dosn't set void context");
1717
p5_void(:context<list>);
18-
is(EVAL(:lang<perl5>,'$::got_void'),0,":contex<list> dosn't sets void context");
18+
is(EVAL(:lang<Perl5>,'$::got_void'),0,":contex<list> dosn't sets void context");
1919

2020
my &p5_scalar := EVAL(
2121
'sub {
@@ -24,13 +24,13 @@ my &p5_scalar := EVAL(
2424
} else {
2525
$::got_scalar = 0;
2626
}
27-
}',:lang<perl5>);
27+
}',:lang<Perl5>);
2828
p5_scalar(:context<scalar>);
29-
is(EVAL(:lang<perl5>,'$::got_scalar'),1,":contex<scalar> sets scalar context");
29+
is(EVAL(:lang<Perl5>,'$::got_scalar'),1,":contex<scalar> sets scalar context");
3030
p5_scalar(:context<void>);
31-
is(EVAL(:lang<perl5>,'$::got_scalar'),0,":contex<void> dosn't set scalar context");
31+
is(EVAL(:lang<Perl5>,'$::got_scalar'),0,":contex<void> dosn't set scalar context");
3232
p5_scalar(:context<list>);
33-
is(EVAL(:lang<perl5>,'$::got_scalar'),0,":contex<list> dosn't sets scalar context");
33+
is(EVAL(:lang<Perl5>,'$::got_scalar'),0,":contex<list> dosn't sets scalar context");
3434

3535
my &p5_list := EVAL(
3636
'sub {
@@ -39,15 +39,15 @@ my &p5_list := EVAL(
3939
} else {
4040
$::got_list = 0;
4141
}
42-
}',:lang<perl5>);
42+
}',:lang<Perl5>);
4343
p5_list(:context<list>);
44-
is(EVAL(:lang<perl5>,'$::got_list'),1,":contex<list> sets list context");
44+
is(EVAL(:lang<Perl5>,'$::got_list'),1,":contex<list> sets list context");
4545
p5_list(:context<scalar>);
46-
is(EVAL(:lang<perl5>,'$::got_list'),0,":contex<scalar> dosn't set list context");
46+
is(EVAL(:lang<Perl5>,'$::got_list'),0,":contex<scalar> dosn't set list context");
4747
p5_list(:context<void>);
48-
is(EVAL(:lang<perl5>,'$::got_list'),0,":contex<void> dosn't sets list context");
48+
is(EVAL(:lang<Perl5>,'$::got_list'),0,":contex<void> dosn't sets list context");
4949

50-
my &p5_list_of_values := EVAL('sub {return (1,2,3,4)}',:lang<perl5>);
50+
my &p5_list_of_values := EVAL('sub {return (1,2,3,4)}',:lang<Perl5>);
5151
ok(p5_list_of_values(:context<void>) === Nil,"a p5 sub called in void context returns a Nil");
5252

5353

S01-perl-5-integration/eval_lex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ plan 1;
44

55
my $self = "some text";
66

7-
is ~EVAL(q/"self is $self"/,:lang<perl5>),"self is some text","lexical inside an EVAL";
7+
is ~EVAL(q/"self is $self"/,:lang<Perl5>),"self is some text","lexical inside an EVAL";
88

99
# vim: ft=perl6

S01-perl-5-integration/exception_handling.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use Test;
55

66
BEGIN {
77
plan 3;
8-
unless (try { EVAL("1", :lang<perl5>) }) {
8+
unless (try { EVAL("1", :lang<Perl5>) }) {
99
skip-rest('no perl 5 support'); exit;
1010
}
1111
}
@@ -29,9 +29,9 @@ sub error {
2929
}
3030
3131
sub test { "1" }
32-
], :lang<perl5>);
32+
], :lang<Perl5>);
3333

34-
my $foo = EVAL("Foo->new",:lang<perl5>);
34+
my $foo = EVAL("Foo->new",:lang<Perl5>);
3535
try { $foo.error };
3636
lives-ok( {
3737
my $err = $!;

S01-perl-5-integration/hash.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
plan(6);
66

7-
unless (try { EVAL("1", :lang<perl5>) }) {
7+
unless (try { EVAL("1", :lang<Perl5>) }) {
88
skip-rest;
99
exit;
1010
}
@@ -49,9 +49,9 @@ sub push {
4949
}
5050
5151
1;
52-
/, :lang<perl5>);
52+
/, :lang<Perl5>);
5353

54-
my $p5ha = EVAL('sub { My::Hash->new($_[0]) }', :lang<perl5>);
54+
my $p5ha = EVAL('sub { My::Hash->new($_[0]) }', :lang<Perl5>);
5555
my %hash = (5 => 'a', 6 => 'b', 7 => 'c', 8 => 'd');
5656
my $p5hash = $p5ha($%hash);
5757

S01-perl-5-integration/import.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ P5 module import test
99
1010
=end pod
1111

12-
unless (try { EVAL("1", :lang<perl5>) }) {
12+
unless (try { EVAL("1", :lang<Perl5>) }) {
1313
skip-rest;
1414
exit;
1515
}

S01-perl-5-integration/method.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
plan(13);
66

7-
unless (try { EVAL("1", :lang<perl5>) }) {
7+
unless (try { EVAL("1", :lang<Perl5>) }) {
88
skip-rest;
99
exit;
1010
}
@@ -58,17 +58,17 @@ sub invoke {
5858
$obj->me ('invoking');
5959
}
6060
61-
/, :lang<perl5>);
61+
/, :lang<Perl5>);
6262

6363
{
64-
my $r = EVAL("FooBar->VERSION", :lang<perl5>);
64+
my $r = EVAL("FooBar->VERSION", :lang<Perl5>);
6565
is($r, '6.0', "class method");
6666
}
6767

6868
my $obj;
6969

7070
{
71-
$obj = EVAL("FooBar->new", :lang<perl5>);
71+
$obj = EVAL("FooBar->new", :lang<Perl5>);
7272
#?rakudo todo "P5 classes not yet shadowed in P6"
7373
{
7474
isa-ok($obj, 'FooBar', "blessed");
@@ -120,7 +120,7 @@ my $obj;
120120
method me ($class: $arg) { 'Foo6'~$arg }; #OK not used
121121
};
122122
my $obj6 = Foo6.new;
123-
$obj = EVAL("FooBar->new", :lang<perl5>);
123+
$obj = EVAL("FooBar->new", :lang<Perl5>);
124124
is($obj.invoke($obj6), 'Foo6invoking', 'invoke p6 method from p5');
125125
}
126126

S01-perl-5-integration/return.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test;
44

55
plan(2);
66

7-
unless (try { EVAL("1", :lang<perl5>) }) {
7+
unless (try { EVAL("1", :lang<Perl5>) }) {
88
skip-rest;
99
exit;
1010
}

0 commit comments

Comments
 (0)