Devel-Gladiator
view release on metacpan or search on metacpan
sv_reftype|5.003007|5.003007|
sv_replace|5.003007|5.003007|
sv_report_used|5.003007|5.003007|
sv_reset|5.003007|5.003007|
sv_resetpvn|5.017005||Viu
SvROK|5.003007|5.003007|
SvROK_off|5.003007|5.003007|
SvROK_on|5.003007|5.003007|
SvRV|5.003007|5.003007|
SvRV_set|5.009003|5.003007|p
sv_rvunweaken|5.027004|5.027004|
sv_rvweaken|5.006000|5.006000|
SvRX|5.009005|5.003007|p
SvRXOK|5.009005|5.003007|p
sv_sethek|5.015004||cViu
sv_setiv|5.003007|5.003007|
sv_setiv_mg|5.004005|5.003007|p
SvSETMAGIC|5.003007|5.003007|
SvSetMagicSV|5.004000|5.004000|
SvSetMagicSV_nosteal|5.004000|5.004000|
sv_setnv|5.006000|5.003007|
sv_setnv_mg|5.006000|5.003007|p
t/Devel-Gladiator.t view on Meta::CPAN
use strict;
use warnings;
use Test::More tests => 5;
use Scalar::Util qw(weaken refaddr);
use Devel::Gladiator;
use Devel::Peek;
my $found;
my $foo = "blah";
my $array = Devel::Gladiator::walk_arena();
ok($array, "walk returned");
is(ref $array, "ARRAY", ".. with an array");
$found = undef;
t/Devel-Gladiator.t view on Meta::CPAN
is($$found, $foo, 'found foo');
@$array = ();
# make a circular reference
my $ptr;
{
my $foo = ["missing!"];
my $bar = \$foo;
$foo->[1] = $bar;
$ptr = $foo;
weaken($ptr);
}
ok($ptr, "foo went missing");
$array = Devel::Gladiator::walk_arena();
$found = undef;
foreach my $value (@$array) {
next unless refaddr($value) == refaddr($ptr);
$found = $value;
}
is($found->[0], "missing!", "found missing item");
( run in 0.248 second using v1.01-cache-2.11-cpan-0d8aa00de5b )