3 # $Id: overload.t,v 1.0 2000/09/01 19:40:42 ram Exp $
5 # Copyright (c) 1995-2000, Raphael Manfredi
7 # You may redistribute only under the same terms as Perl 5, as specified
8 # in the README file that comes with the distribution.
10 # $Log: overload.t,v $
11 # Revision 1.0 2000/09/01 19:40:42 ram
12 # Baseline for first official release.
19 require Config; import Config;
20 if ($Config{'extensions'} !~ /\bStorable\b/) {
21 print "1..0 # Skip: Storable was not built\n";
24 require 'lib/st-dump.pl';
29 use Storable qw(freeze thaw);
36 '""' => sub { $_[0][0] };
40 $a = bless [77], OVERLOADED;
43 ok 1, ref $b eq 'OVERLOADED';
47 ok 3, ref $c eq 'REF';
48 ok 4, ref $$c eq 'OVERLOADED';
51 $d = thaw freeze [$a, $a];
52 ok 6, "$d->[0]" eq "77";
54 ok 7, "$d->[1]" eq "78";