Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The init block was added to help solve some problems when using IPC. It is not critical that it run, specially when someone does something clever, which is the usual cause of the warning. See https://rt.perl.org/Ticket/Display.html?id=133382
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test2::Util qw/CAN_THREAD/; | ||
BEGIN { | ||
unless(CAN_THREAD) { | ||
require Test::More; | ||
Test::More->import(skip_all => "threads are not supported"); | ||
} | ||
} | ||
|
||
use threads; | ||
|
||
my @warns; | ||
{ | ||
local $SIG{__WARN__} = sub { push @warns => @_ }; | ||
require Test::More; | ||
} | ||
|
||
Test::More::is_deeply(\@warns, [], "No init warning"); | ||
|
||
Test::More::done_testing(); |