Commit | Line | Data |
87a42246 |
1 | #!./perl |
2 | |
3 | BEGIN { |
4 | if ($^O eq 'MacOS') { |
5 | @INC = qw(: ::lib ::macos:lib); |
6 | } |
7 | } |
8 | |
9 | $| = 1; |
10 | use warnings; |
11 | use strict; |
12 | use Config; |
13 | |
14 | print "1..1\n"; |
15 | |
16 | my $test = 1; |
17 | |
18 | sub ok { print "ok $test\n"; $test++ } |
19 | |
20 | |
21 | my $a; |
22 | my $Is_VMS = $^O eq 'VMS'; |
23 | my $Is_MacOS = $^O eq 'MacOS'; |
24 | |
25 | my $path = join " ", map { qq["-I$_"] } @INC; |
26 | my $redir = $Is_MacOS ? "" : "2>&1"; |
27 | |
28 | |
29 | chomp($a = `$^X $path "-MB::Stash" "-Mwarnings" -e1`); |
30 | $a = join ',', sort split /,/, $a; |
5456cc46 |
31 | $a =~ s/-u(PerlIO|open)(?:::\w+)?,//g; |
87a42246 |
32 | $a =~ s/-uWin32,// if $^O eq 'MSWin32'; |
2986a63f |
33 | $a =~ s/-uNetWare,// if $^O eq 'NetWare'; |
87a42246 |
34 | $a =~ s/-u(Cwd|File|File::Copy|OS2),//g if $^O eq 'os2'; |
35 | $a =~ s/-uCwd,// if $^O eq 'cygwin'; |
87a42246 |
36 | $b = '-uCarp,-uCarp::Heavy,-uDB,-uExporter,-uExporter::Heavy,-uattributes,' |
37 | . '-umain,-ustrict,-uutf8,-uwarnings'; |
38535c98 |
38 | if ($Is_VMS) { |
39 | $a =~ s/-uFile,-uFile::Copy,//; |
40 | $a =~ s/-uVMS,-uVMS::Filespec,//; |
41 | $a =~ s/-uSocket,//; # Socket is optional/compiler version dependent |
42 | } |
371ddd85 |
43 | |
44 | { |
45 | no strict 'vars'; |
46 | use vars '$OS2::is_aout'; |
47 | } |
347fb945 |
48 | if (($Config{static_ext} eq ' ' || |
49 | ($Config{static_ext} eq 'Socket' && $Is_VMS)) |
50 | && !($^O eq 'os2' and $OS2::is_aout) |
371ddd85 |
51 | ) { |
52 | if (ord('A') == 193) { # EBCDIC sort order is qw(a A) not qw(A a) |
53 | $b = join ',', sort split /,/, $b; |
54 | } |
55 | print "# [$a]\n# vs.\n# [$b]\nnot " if $a ne $b; |
56 | ok; |
87a42246 |
57 | } else { |
371ddd85 |
58 | print "ok $test # skipped: one or more static extensions\n"; $test++; |
87a42246 |
59 | } |
371ddd85 |
60 | |