id $there";
isnt $uplevel_uid, $source_uid, "\$uplevel_uid != \$source_uid $there";
isnt $uplevel_uid, $between_uid, "\$uplevel_uid != \$between_uid $there";
isnt $uplevel_uid, $ta
isnt $uplevel_uid, $above_uid, "\$uplevel_uid != \$above_uid $there";
{
my $here = uid;
isnt $here, $source_uid, "\$here != \$source_uid in block $there";
isnt $he
tween_uid, "\$here != \$between_uid in block $there";
isnt $here, $target_uid, "\$here != \$target_uid in block $there";
isnt $here, $above_uid, "\$here != \$above_uid in block $there
isnt $here, uid(), 'uid(UP) != uid(HERE)';
}
is $here, uid(), '$here defined in an older block is now OK';
}
isnt $here, uid(), '$here defined in an older block is no longer OK';
{
isnt $h
uid();
} else {
isnt $first, uid(), 'a new UID for each loop iteration';
}
}
}
{
my $top;
my $uid;
sub Scope::Upper::TestUIDDestructor::DESTROY {
$uid = uid;
isnt $uid, $top, '$uid is
stUIDDestructor';
$top = uid;
}
isnt $uid, undef, '$uid was set in the destructor';
{
isnt $uid, uid(), '$uid is no longer valid (in block)';
sub {
isnt $uid, uid(), '$uid is no longer va
: {
skip "system() failed: $!" => 1 if $? == -1;
if ($in) {
is $?, 0, $desc;
} else {
isnt $?, 0, $desc;
}
}
}
eval "setpgrp 0, 0";
my $time = time;
{
local $ENV{SCOPE_UPPER_TEST};
ub {
my $up = HERE;
sub {
is UP, $up, "$desc: before";
&uplevel(\&HERE => $up);
isnt HERE, $up, "$desc: after 1";
}->();
is HERE, $up, "$desc: after 2";
}->();
};
is $@, ''