#!./perl
#
# Copyright (c) 1995-2000, Raphael Manfredi
#
# You may redistribute only under the same terms as Perl 5, as specified
# in the README file that comes with the distribution.
#
chdir('t') if -d 't';
} else {
}
print "1..0 # Skip: Storable was not built\n";
exit 0;
}
}
sub ok;
print "1..23\n";
($scalar_fetch, $array_fetch, $hash_fetch) = (0, 0, 0);
return $self;
}
my $self = shift;
$main::hash_fetch++;
}
my $self = shift;
}
my $self = shift;
}
my $self = shift;
}
return $self;
}
my $self = shift;
$main::array_fetch++;
}
my $self = shift;
}
my $self = shift;
return @{$self};
}
my $scalar;
return $self;
}
my $self = shift;
$main::scalar_fetch++;
return $$self;
}
my $self = shift;
}
$fault = 0;
my $pkg = shift;
}
my $self = shift;
$fault++;
}
$a = 'toto';
$b = \$a;
#$scalar = 'foo';
#$hash{'attribute'} = \$d;
#$array[0] = $c;
#$array[1] = \$scalar;
### If I say
### $hash{'attribute'} = $d;
### below, then dump() incorectly dumps the hash value as a string the second
### time it is reached. I have not investigated enough to tell whether it's
### a bug in my dump() routine or in the Perl tieing mechanism.
$scalar = 'foo';
$array[1] = $c;
@a = ('first', 3, -4, -3.14159, 456, 4.5, $d, \$d,
### Used to see the manifestation of the bug documented above.
### print "original: $dumped";
### print "--------\n";
### print "got: $got";
### print "--------\n";
# Ensure the tied items in the retrieved image work
@old = ($scalar_fetch, $array_fetch, $hash_fetch);
@new = ($scalar_fetch, $array_fetch, $hash_fetch);
# Tests 10..15
for ($i = 0; $i < @new; $i++) {
}
# Check undef ties
my $h = {};
{
package P;
$b = "not ok ";
print $b , 23, "\n";
}