Debian Codegraph @

t/11stages-check.t

raw
1 #!/usr/bin/perl
2
3 use v5.14;
4 use warnings;
5
6 use Test2::V0;
7
8 use lib "t";
9 use testcase "t::stages";
10
11 BEGIN { $^H{"t::stages/permitkey"} = 1; }
12 BEGIN { $^H{"t::stages/permitfunc"} = 1; }
13
14 our $VAR;
15
16 {
17 BEGIN { $^H{"t::stages/check-capture"} = 1; }
18
19 BEGIN { $VAR = "before" }
20
21 no warnings 'void';
22 stages {
23 BEGIN { $VAR = "inside" }
24 };
25
26 is( $t::stages::captured, "before",
27 'captured value of $VAR before block' );
28 }
29
30 done_testing;