File tree Expand file tree Collapse file tree 6 files changed +29
-5
lines changed Expand file tree Collapse file tree 6 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 44 *CORE::GLOBAL::fork = sub { die " you should not fork" };
55}
66use Config;
7- tied (%Config )-> {d_fork } = 0; # blatant lie
7+ if ($Config::Config {d_fork }) {
8+ if (exists &Config::KEYS) { # compiled Config
9+ *Config_FETCHorig = \&Config::FETCH;
10+ no warnings ' redefine' ;
11+ *Config::FETCH = sub {
12+ if ($_ [0] and $_ [1] eq ' d_fork' ) {
13+ return 0;
14+ } else {
15+ return Config_FETCHorig(@_ );
16+ }
17+ }
18+ } else {
19+ tied (%Config )-> {d_fork } = 0; # uncompiled Config
20+ }
21+ }
822
923=begin TEST
1024
Original file line number Diff line number Diff line change 22
33use strict;
44use warnings;
5+ BEGIN {
6+ chdir ' cpan/Test-Harness' unless -e ' t/sample-tests/simple' ;
7+ }
58use lib ' t/lib' ;
69
10+ use Config ();
711use Test::More qw( no_plan ) ;
812
913use File::Spec;
Original file line number Diff line number Diff line change 44# NOTE maybe a good candidate for xt/author or something.
55
66BEGIN {
7+ chdir ' cpan/Test-Harness' unless -e ' t/lib/NoFork.pm' ;
78 use lib ' t/lib' ;
89}
910
@@ -15,7 +16,8 @@ use Test::More (
1516 $Config {d_fork }
1617 ? ' no_plan'
1718 : ( ' skip_all' => ' your system already has no fork' )
18- );
19+ );
20+
1921use IO::c55Capture; # for util
2022
2123use TAP::Harness;
Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ BEGIN {
77use strict;
88use warnings;
99
10+ use Config;
11+ if ($Config::Config {usecperl }) {
12+ use Test::More ' skip_all' => ' cperl bug CM-834' ;
13+ }
1014use Test::More ' no_plan' ;
1115
1216use File::Spec;
13- use Config;
1417
1518use constant TRUE => " __TRUE__" ;
1619use constant FALSE => " __FALSE__" ;
Original file line number Diff line number Diff line change 11print "1..1\n";
2- print $INC{'strict .pm'} ? "ok 1\n" : "not ok 1\n";
2+ print $INC{'vars .pm'} ? "ok 1\n" : "not ok 1\n";
Original file line number Diff line number Diff line change @@ -355,7 +355,8 @@ sub test_handler {
355355
356356 SKIP:
357357 {
358- %int ::; # init the coretype if missing
358+ no warnings ' void' ;
359+ %int :: unless %int ::; # init the coretype if missing
359360 my int $planned = 1;
360361 $planned += 1 + scalar @{ $test -> {output } } if $test -> {output };
361362 skip " $test ->{skip_reason}" , $planned if $test -> {skip };
You can’t perform that action at this time.
0 commit comments