Silence some warnings introduced by #33507
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_const.t
CommitLineData
cf7fe8a2 1
2BEGIN {
3 unless(grep /blib/, @INC) {
4 chdir 't' if -d 't';
20822f61 5 @INC = '../lib';
cf7fe8a2 6 }
7}
8
9use Config;
10
11BEGIN {
d846159b 12 if($ENV{PERL_CORE}) {
13 if ($Config{'extensions'} !~ /\bIO\b/) {
14 print "1..0 # Skip: IO extension not compiled\n";
15 exit 0;
cf7fe8a2 16 }
17 }
18}
19
20use IO::Handle;
21
22print "1..6\n";
23my $i = 1;
24foreach (qw(SEEK_SET SEEK_CUR SEEK_END _IOFBF _IOLBF _IONBF)) {
25 my $d1 = defined(&{"IO::Handle::" . $_}) ? 1 : 0;
26 my $v1 = $d1 ? &{"IO::Handle::" . $_}() : undef;
27 my $v2 = IO::Handle::constant($_);
28 my $d2 = defined($v2);
29
30 print "not "
31 if($d1 != $d2 || ($d1 && ($v1 != $v2)));
32 print "ok ",$i++,"\n";
33}