7 my ($got, $expect, $name) = @_;
9 if (defined $got && $got eq $expect) {
10 print "ok $test - $name\n";
14 print "not ok $test - $name\n";
15 my @caller = caller(0);
16 print "# Failed test at $caller[1] line $caller[2]\n";
18 print "# Got '$got'\n";
20 print "# Got undef\n";
22 print "# Expected $expect\n";
28 # tie, track, and report what calls are made
31 for ($AUTOLOAD =~ /TieAll::(.*)/) {
32 if (/TIE/) { return bless {} }
33 elsif (/calls/) { return join ',', splice @calls }
36 # FETCHSIZE doesn't like undef
37 # if FIRSTKEY, see if NEXTKEY is also called
38 return 1 if /FETCHSIZE|FIRSTKEY/;
50 is(TieAll->calls, '', 'our $x has no runtime effect');
53 is(TieAll->calls, '', 'our ($x) has no runtime effect');
56 is(TieAll->calls, '', 'our %x has no runtime effect');
59 is(TieAll->calls, '', 'our (%x) has no runtime effect');
62 is(TieAll->calls, '', 'our @x has no runtime effect');
65 is(TieAll->calls, '', 'our (@x) has no runtime effect');
73 is($y, 2, 'our shouldnt be visible until introduced')