Commit | Line | Data |
c77361b0 |
1 | use strictures 1; |
2 | # disable the "Useless use of anonymous list ([]) in void context" |
3 | # warning so we can perl -c this file during development |
4 | no warnings 'void'; |
95076525 |
5 | use Scalar::Util qw(weaken); |
a231da50 |
6 | [ |
7 | data_structure => |
8 | { |
9 | sv_undef => undef, |
10 | sv_iv => 3, |
11 | sv_nv => 4.2, |
12 | sv_pv => "spoon", |
13 | ref_scalar => \"foo\nbar", |
14 | ref_array => [ 1, \undef, "73" ], |
15 | } |
16 | ], |
17 | [ |
18 | cross_refs => |
19 | do { |
20 | my ($x, $y, $z) = (\1, { two => 2 }, [ three => 3 ]); |
21 | +{ |
22 | one => $x, |
23 | two => $y, |
24 | three => $z, |
25 | inner => { |
26 | one => $x, |
27 | }, |
28 | inner2 => [ |
29 | three => $z, |
30 | ] |
31 | }; |
32 | } |
c77361b0 |
33 | ], |
34 | do { sub DDXSTest::foo { 'DDXSTest::foo' } () }, |
35 | [ |
36 | global_sub => { foo => \&DDXSTest::foo } |
95076525 |
37 | ], |
38 | [ |
39 | weaken_1 => do { |
40 | my $x = 1; |
41 | my $y = [ \$x, \$x, \$x ]; |
42 | weaken($y->[1]); |
43 | $y; |
44 | } |
45 | ], |
46 | [ |
47 | weaken_0 => do { |
48 | my $x = 1; |
49 | my $y = [ \$x, \$x, \$x ]; |
50 | weaken($y->[0]); |
51 | $y; |
52 | } |
4a4c86ce |
53 | ], |
54 | [ simple_object => { object => bless({}, 'Class') } ], |
55 | [ double_object => { o1 => bless({}, 'Class'), o2 => bless({}, 'Class') } ], |