Algorithm-Diff-Callback

 view release on metacpan or  search on metacpan

t/00-compile.t  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
 
my @warnings;
for my $lib (@module_files)
{
    # see L<perlfaq8/How can I capture STDERR from an external command?>
    my $stderr = IO::Handle->new;
 
    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
    my @_warnings = <$stderr>;
    waitpid($pid, 0);
    is($?, 0, "$lib loaded ok");
 
    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
        and not eval { require blib; blib->VERSION('1.01') };
 
    if (@_warnings)
    {
        warn @_warnings;
        push @warnings, @_warnings;



( run in 0.335 second using v1.01-cache-2.11-cpan-95122f20152 )