Your IP : 216.73.217.90


Current Path : /proc/self/root/proc/self/root/proc/self/root/usr/share/doc/perl-Moose/t/exceptions/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/self/root/usr/share/doc/perl-Moose/t/exceptions/frame-leak.t

use strict;
use warnings;

use Test::More;
use Test::Fatal;
use Test::Requires 'Test::Memory::Cycle';

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

{
    package Foo;
    use Moose;
    has myattr => ( is => 'ro', required => 1 );
}

memory_cycle_ok(
    exception { Foo->new() },
    'exception objects do not leak arguments into Devel::StackTrace objects',
);

done_testing;