AlignDB-Run

 view release on metacpan or  search on metacpan

lib/AlignDB/Run.pm  view on Meta::CPAN

        my $next = shift @{$jobs};
        last unless defined $next;

        $heap->{count}++;
        printf "===Do task %u out of %u===\n", $heap->{count}, $heap->{all};

        my $task = POE::Wheel::Run->new(
            Program => sub {

                # Required for this to work on MSWin32
                binmode(STDOUT);
                binmode(STDERR);

                $code->( $next, $opt );
            },
            StdioFilter  => POE::Filter::Line->new,
            StderrFilter => POE::Filter::Line->new,
            StdoutEvent  => 'task_message',
            StderrEvent  => 'task_message',
            CloseEvent   => 'task_done',
        );



( run in 0.231 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )