Storable-AMF
view release on metacpan or search on metacpan
t/06-aux-utility.t view on Meta::CPAN
use strict;
no warnings 'once';
if ($] > 5.020){
eval 'use Test::More skip_all => "This perl version is too modern( >= 5.020 )"';
exit;
}
eval 'use Test::More tests => 6+6;';
use warnings;
no warnings 'once';
our $msg;
sub tt(&);
sub tt(&){
my $sub = shift;
my $s = ref_mem_safe( $sub );
$msg = $s;
return ($s)if $s;
return undef;
}
my $a1 = [];
ok(! ref_lost_memory([]));
ok(! ref_lost_memory([[]]));
t/47-mem-safe-AMF3.t view on Meta::CPAN
# vim: et ts=8 sw=4 sts=4
use lib 't';
use ExtUtils::testlib;
use Storable::AMF3 qw(freeze thaw ref_lost_memory ref_clear deparse_amf);
use Scalar::Util qw(refaddr);
use GrianUtils qw(ref_mem_safe loose $msg);
use strict;
use warnings;
no warnings 'once';
sub tt(&);
sub loose(&);
my @item;
push @item, GrianUtils->my_items($_) for qw(t/AMF0 t/AMF3);
my @objs = grep !ref_lost_memory( $_->{obj} ), @item;
my @recurrent = grep ref_lost_memory( $_->{obj} ), @item;
my ( $name, $obj, $image_amf3, $image_amf0 );
( run in 1.382 second using v1.01-cache-2.11-cpan-524268b4103 )