Skip to content

Commit

Permalink
Make test use proper dynamic variables
Browse files Browse the repository at this point in the history
"is dynamic" forces one to have to use the CALLER:: syntax, which is a bad
idea from an optimization point of view.
  • Loading branch information
lizmat committed Mar 17, 2019
1 parent 75132b8 commit 073388d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions S03-operators/context-forcers.t
Expand Up @@ -143,8 +143,7 @@ subtest 'numeric context' => {
}

{
my $arrayref is dynamic = list(1,2,3);
my $boo is dynamic = 37;
my $*arrayref = list(1,2,3);
ok eval_elsewhere('?(@$*arrayref)'), '?(@$arrayref) syntax works';
ok eval_elsewhere('?(@($*arrayref))'), '?(@($arrayref)) syntax works';
}
Expand All @@ -169,8 +168,7 @@ subtest 'numeric context' => {

}
{
my $arrayref is dynamic = list(1,2,3);

my $*arrayref = list(1,2,3);
ok eval_elsewhere('!(!(@$*arrayref))'), '!(@$arrayref) syntax works';
ok eval_elsewhere('!(!(@($*arrayref)))'), '!(@($arrayref)) syntax works';
}
Expand Down

0 comments on commit 073388d

Please sign in to comment.