1#!/usr/bin/perl -w
2use Config; # To prevent conflict with some strawberry-portable versions
3
4BEGIN {
5    if( $ENV{PERL_CORE} ) {
6        chdir 't';
7        @INC = '../lib';
8    }
9}
10
11use Carp qw/cluck/;
12
13# Make sure this is in place before Test::More is loaded.
14my $started = 0;
15my $handler_called;
16BEGIN {
17    $SIG{__DIE__} = sub { $handler_called++; cluck 'Died early!' unless $started };
18}
19
20use Test::More tests => 2;
21
22$started = 1;
23ok !eval { die };
24is $handler_called, 1, 'existing DIE handler not overridden';
25