1#!perl
2
3# This test checks to make sure that a BEGIN block created from an XS call
4# does not implicitly change the current warning scope, causing a CHECK
5# or INIT block created after the corresponding phase to warn when it
6# shouldn���t.
7
8use Test::More tests => 1;
9
10$SIG{__WARN__} = sub { $w .= shift };
11
12use warnings;
13eval q|
14  BEGIN{
15    no warnings;
16    package XS::APItest; require XSLoader; XSLoader::load()
17  }
18|;
19
20is $w, undef, 'No warnings about CHECK and INIT in warningless scope';
21