3 # Copyright (c) 1995-2000, Raphael Manfredi
5 # You may redistribute only under the same terms as Perl 5, as specified
6 # in the README file that comes with the distribution.
12 @INC = ('.', '../lib', '../ext/Storable/t');
16 require Config; import Config;
17 if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) {
18 print "1..0 # Skip: Storable was not built\n";
27 use Storable qw(lock_store lock_retrieve);
29 unless (&Storable::CAN_FLOCK) {
30 print "1..0 # Skip: fcntl/flock emulation broken on this platform\n";
36 @a = ('first', undef, 3, -4, -3.14159, 456, 4.5);
39 # We're just ensuring things work, we're not validating locking.
42 ok 1, defined lock_store(\@a, 'store');
43 ok 2, $dumped = &dump(\@a);
45 $root = lock_retrieve('store');
46 ok 3, ref $root eq 'ARRAY';
48 ok 5, &dump($root) eq $dumped;