blessed reference support
[p5sagit/Data-Dumper-ToXS.git] / t / fixtures.pl
index 3884f4d..2ed6e75 100644 (file)
@@ -1,3 +1,8 @@
+use strictures 1;
+# disable the "Useless use of anonymous list ([]) in void context"
+# warning so we can perl -c this file during development
+no warnings 'void';
+use Scalar::Util qw(weaken);
 [
   data_structure =>
   {
         ]
       };
     }
-]
+],
+do { sub DDXSTest::foo { 'DDXSTest::foo' } () },
+[
+  global_sub => { foo => \&DDXSTest::foo }
+],
+[
+  weaken_1 => do {
+    my $x = 1;
+    my $y = [ \$x, \$x, \$x ];
+    weaken($y->[1]);
+    $y;
+  }
+],
+[
+  weaken_0 => do {
+    my $x = 1;
+    my $y = [ \$x, \$x, \$x ];
+    weaken($y->[0]);
+    $y;
+  }
+],
+[ simple_object => { object => bless({}, 'Class') } ],
+[ double_object => { o1 => bless({}, 'Class'), o2 => bless({}, 'Class') } ],