1N/A# Copyright (c) 1995-2000, Raphael Manfredi 1N/A# You may redistribute only under the same terms as Perl 5, as specified 1N/A# in the README file that comes with the distribution. 1N/A chdir('t') if -d 't'; 1N/A print "1..0 # Skip: Storable was not built\n"; 1N/A# Uncomment the folowing line to get a dump of the constructed data structure 1N/A# (you may want to reduce the size of the hashes too) 1N/A# Use MD5 if its available to make random string keys 1N/A# Use Data::Dumper if debugging and it is available to create an ASCII dump 1N/A "July", "August", "September", "October", "November", "December" ); 1N/A# Build some arbitrarily complex data structure starting with a top level hash 1N/A# (deeper levels contain scalars, references to hashes or references to arrays); 1N/A # A third of the elements are references to further hashes 1N/A # A further third are references to arrays 1N/A# Copy the hash, element by element in order of the keys 1N/A# Deep clone the hash 1N/A# In canonical mode the frozen representation of each of the hashes 1N/A# should be identical 1N/A# In normal mode it is exceedingly unlikely that the frozen 1N/A# representaions of all the hashes will be the same (normally the hash 1N/A# elements are frozen in the order they are stored internally, 1N/A# Two out of three the same may be a coincidence, all three the same 1N/A# is much, much more unlikely. Still it could happen, so this test 1N/A# may report a false negative. 1N/A# Ensure refs to "undef" values are properly shared 1N/A# Same test as in t/dclone.t to ensure the "canonical" code is also correct