7 @INC = qw(: ::lib ::macos:lib);
16 if (($Config::Config{'extensions'} !~ /\bB\b/) ){
17 print "1..0 # Skip -- Perl configured without B module\n";
31 sub ok { print "ok $test\n"; $test++ }
35 my $Is_VMS = $^O eq 'VMS';
36 my $Is_MacOS = $^O eq 'MacOS';
38 my $path = join " ", map { qq["-I$_"] } @INC;
39 $path = '"-I../lib" "-Iperl_root:[lib]"' if $Is_VMS; # gets too long otherwise
40 my $redir = $Is_MacOS ? "" : "2>&1";
42 chomp($got = `$^X $path "-MB::Stash" "-Mwarnings" -e1`);
46 print "# got = $got\n";
48 my @got = map { s/^\S+ //; $_ }
50 map { lc($_) . " " . $_ }
53 print "# (after sorting)\n";
54 print "# got = @got\n";
56 @got = grep { ! /^(PerlIO|open)(?:::\w+)?$/ } @got;
58 print "# (after perlio censorings)\n";
59 print "# got = @got\n";
61 @got = grep { ! /^Win32$/ } @got if $^O eq 'MSWin32';
62 @got = grep { ! /^NetWare$/ } @got if $^O eq 'NetWare';
63 @got = grep { ! /^(Cwd|File|File::Copy|OS2)$/ } @got if $^O eq 'os2';
64 @got = grep { ! /^(Cwd|Cygwin)$/ } @got if $^O eq 'cygwin';
67 @got = grep { ! /^File(?:::Copy)?$/ } @got;
68 @got = grep { ! /^VMS(?:::Filespec)?$/ } @got;
69 @got = grep { ! /^vmsish$/ } @got;
70 # Socket is optional/compiler version dependent
71 @got = grep { ! /^Socket$/ } @got;
74 print "# (after platform censorings)\n";
75 print "# got = @got\n";
79 my $expected = "attributes Carp Carp::Heavy DB Internals main Regexp utf8 version warnings";
82 $expected =~ s/version //;
83 $expected =~ s/DB/DB Exporter Exporter::Heavy/;
88 use vars '$OS2::is_aout';
91 if ((($Config{static_ext} eq ' ') || ($Config{static_ext} eq ''))
92 && !($^O eq 'os2' and $OS2::is_aout)
94 print "# got [$got]\n# vs.\n# expected [$expected]\nnot " if $got ne $expected;
97 print "ok $test # skipped: one or more static extensions\n"; $test++;