3 # $Id: overload.t,v 0.7.1.1 2000/08/13 20:10:10 ram Exp $
5 # Copyright (c) 1995-2000, Raphael Manfredi
7 # You may redistribute only under the terms of the Artistic License,
8 # as specified in the README file that comes with the distribution.
10 # $Log: overload.t,v $
11 # Revision 0.7.1.1 2000/08/13 20:10:10 ram
17 require Config; import Config;
18 if ($Config{'extensions'} !~ /\bStorable\b/) {
19 print "1..0 # Skip: Storable was not built\n";
22 unshift @INC, '../lib';
23 require 'lib/st-dump.pl';
28 use Storable qw(freeze thaw);
35 '""' => sub { $_[0][0] };
39 $a = bless [77], OVERLOADED;
42 ok 1, ref $b eq 'OVERLOADED';
46 ok 3, ref $c eq 'REF';
47 ok 4, ref $$c eq 'OVERLOADED';
50 $d = thaw freeze [$a, $a];
51 ok 6, "$d->[0]" eq "77";
53 ok 7, "$d->[1]" eq "78";