7 use Test::Leaner 'no_plan';
9 use Scope::Upper qw<uplevel uid validate_uid CALLER>;
22 my @args = ($n - 1 => ($level, $target) => @uids);
23 if ($inner_uplevels) {
28 return rec(@args, uid());
32 my $desc = "level=$level, target=$target, inner_uplevels=$inner_uplevels";
35 for my $i (1 .. $target) {
37 ok !validate_uid($uids[$j]), "UID $j is invalid for $desc";
39 for my $i ($target + 1 .. $level) {
41 ok validate_uid($uids[$j]), "UID $j is valid for $desc";
47 local $inner_uplevels = 0;
48 for my $level (1 .. $max_level) {
49 for my $target (1 .. $level) {
50 rec($level => ($level, $target));
56 local $inner_uplevels = 1;
57 for my $level (1 .. $max_level) {
58 for my $target (1 .. $level) {
59 rec($level => ($level, $target));