File: 07_stack.t

package info (click to toggle)
libdata-clone-perl 0.006-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208 kB
  • sloc: perl: 669; makefile: 8; ansic: 5
file content (22 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!perl -w

use strict;
use warnings FATAL => 'all';

use Test::More;

use Data::Clone;

{
    package Bar;
    sub clone {
        () = (1)x100000; # extend the stack
        return []
    }
}

my $before = bless [], Bar::;
my $after  = clone($before);
isnt $after, $before, 'stack reallocation during callback';

done_testing;