6 @INC = qw(: ::lib ::macos:lib);
21 sub ok { print "ok $test\n"; $test++ }
25 my $Is_VMS = $^O eq 'VMS';
26 my $Is_MacOS = $^O eq 'MacOS';
28 my $path = join " ", map { qq["-I$_"] } @INC;
29 $path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise
30 my $redir = $Is_MacOS ? "" : "2>&1";
33 chomp($a = `$^X $path "-MB::Stash" "-Mwarnings" -e1`);
34 $a = join ',', sort split /,/, $a;
35 $a =~ s/-u(PerlIO|open)(?:::\w+)?,//g;
36 $a =~ s/-uWin32,// if $^O eq 'MSWin32';
37 $a =~ s/-uNetWare,// if $^O eq 'NetWare';
38 $a =~ s/-u(Cwd|File|File::Copy|OS2),//g if $^O eq 'os2';
39 $a =~ s/-uCwd,// if $^O eq 'cygwin';
40 $b = '-uCarp,-uCarp::Heavy,-uDB,-uExporter,-uExporter::Heavy,-uattributes,'
41 . '-umain,-ustrict,-uutf8,-uwarnings';
43 $a =~ s/-uFile,-uFile::Copy,//;
44 $a =~ s/-uVMS,-uVMS::Filespec,//;
45 $a =~ s/-uSocket,//; # Socket is optional/compiler version dependent
50 use vars '$OS2::is_aout';
52 if ((($Config{static_ext} eq ' ') || ($Config{static_ext} eq ''))
53 && !($^O eq 'os2' and $OS2::is_aout)
55 if (ord('A') == 193) { # EBCDIC sort order is qw(a A) not qw(A a)
56 $b = join ',', sort split /,/, $b;
58 print "# [$a]\n# vs.\n# [$b]\nnot " if $a ne $b;
61 print "ok $test # skipped: one or more static extensions\n"; $test++;