Lines Matching refs:ref
56 $ref[0] = \@a;
57 $ref[1] = \@b;
58 $ref[2] = \@c;
59 $ref[3] = \@d;
61 push(@{$ref[$i]}, "ok $ary[$i]\n");
64 print ${$ref[1]}[0];
65 print @{$ref[2]}[0];
76 $ref = [[],2,[3,4,5,]];
77 print scalar @$ref == 3 ? "ok 14\n" : "not ok 14\n";
78 print $$ref[1] == 2 ? "ok 15\n" : "not ok 15\n";
79 print ${$$ref[2]}[2] == 5 ? "ok 16\n" : "not ok 16\n";
80 print scalar @{$$ref[0]} == 0 ? "ok 17\n" : "not ok 17\n";
82 print $ref->[1] == 2 ? "ok 18\n" : "not ok 18\n";
83 print $ref->[2]->[0] == 3 ? "ok 19\n" : "not ok 19\n";
88 $refref->{"key"} = $ref;
114 # Test the ref operator.
116 print ref $subref eq CODE ? "ok 25\n" : "not ok 25\n";
117 print ref $ref eq ARRAY ? "ok 26\n" : "not ok 26\n";
118 print ref $refref eq HASH ? "ok 27\n" : "not ok 27\n";
123 print ref $anonhash eq HASH ? "ok 28\n" : "not ok 28\n";
132 print ref $object eq MYHASH ? "ok 30\n" : "not ok 30\n";
136 print ref $object2 eq MYHASH ? "ok 32\n" : "not ok 32\n";
144 die 'Got a "' . ref($THIS). '" instead of a MYHASH'
145 unless ref $THIS eq MYHASH;
162 print ref shift ne HASH ? "ok 35\n" : "not ok 35\n";
185 local $ref = shift;
186 die "Not an OBJ" unless ref $ref eq OBJ;
187 $ref->{shift()};
207 print grep(ref($_), @bar) == 3 ? "ok 40\n" : "not ok 40\n";
214 print grep(ref($_), @baa) == 3 ? "ok 43\n" : "not ok 43\n";
219 print $@ =~ /Can\'t modify.*ref.*in.*assignment/ ? "ok 45\n" : "not ok 45\n";