1#!./perl 2# 3# Copyright (c) 2002 Slaven Rezic 4# 5# You may redistribute only under the same terms as Perl 5, as specified 6# in the README file that comes with the distribution. 7# 8 9sub BEGIN { 10 unshift @INC, 't'; 11 unshift @INC, 't/compat' if $] < 5.006002; 12 require Config; import Config; 13 if ($ENV{PERL_CORE} and $Config{'extensions'} !~ /\bStorable\b/) { 14 print "1..0 # Skip: Storable was not built\n"; 15 exit 0; 16 } 17} 18 19use strict; 20use Test::More tests => 1; 21 22my @warns; 23$SIG{__WARN__} = sub { push @warns, shift }; 24$SIG{__DIE__} = sub { require Carp; warn Carp::longmess(); warn "Evil die!" }; 25 26require Storable; 27 28Storable::dclone({foo => "bar"}); 29 30is(join("", @warns), "", "__DIE__ is not evil here"); 31