SYNOPSIS

use Testcontainers::Wait;

# Wait for a specific log message
my $wait = Testcontainers::Wait::for_log('ready to accept connections');

# Wait for a regex pattern
my $wait = Testcontainers::Wait::for_log(qr/listening on port \d+/);

# Wait for multiple occurrences
my $wait = Testcontainers::Wait::for_log('connected', occurrences => 2);

DESCRIPTION

Waits for a specific string or regex pattern to appear in the container logs. Equivalent to Go's wait.ForLog().

String or compiled regex (qr//) to match in container logs.

Number of times the pattern must appear. Default: 1.

Check container logs for the pattern. Returns true when the required number of occurrences is found.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 39:

Unknown directive: =attr

Around line 50:

Unknown directive: =attr

Around line 86:

Unknown directive: =method