This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document string- and number-specific bitops in perlop
[perl5.git] / dist / Storable / t / sig_die.t
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
9 sub 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
19 use strict;
20 use Test::More tests => 1;
21
22 my @warns;
23 $SIG{__WARN__} = sub { push @warns, shift };
24 $SIG{__DIE__}  = sub { require Carp; warn Carp::longmess(); warn "Evil die!" };
25
26 require Storable;
27
28 Storable::dclone({foo => "bar"});
29
30 is(join("", @warns), "", "__DIE__ is not evil here");