perldoc > TAP::Parser::Scheduler

📛 NAME

TAP::Parser::Scheduler - Schedule tests during parallel testing

🚀 Quick Reference

Use CaseCommandDescription
Create scheduler with default parallelTAP::Parser::Scheduler->new(tests => \@tests)All tests run in parallel
Create scheduler with sequential rulesTAP::Parser::Scheduler->new(tests => \@tests, rules => \%rules)Control parallel vs sequential execution
Get next available job$sched->get_job()Returns a Job object or Spinner if none ready
Get all remaining tests$sched->get_all()List of all tests not yet scheduled
Display scheduling tree$sched->as_string()Human-readable representation of the schedule

📦 VERSION

Version 3.43

📝 SYNOPSIS

use TAP::Parser::Scheduler;

📖 DESCRIPTION

🛠️ METHODS

🔧 Class Methods

📐 Rules data structure

The rules data structure is the heart of the scheduler. It allows you to express simple rules like "run all tests in sequence" or "run all tests in parallel except these five tests." However, the rules structure also supports glob-style pattern matching and recursive definitions, so you can also express arbitrarily complicated patterns.

The rule must only have one top level key: either par for "parallel" or seq for "sequence".

Values must be either strings with possible glob-style matching, or arrayrefs of strings or hashrefs which follow this pattern recursively.

Every element in an arrayref directly below a par key is eligible to be run in parallel, while values directly below a seq key must be run in sequence.

💡 Rules examples

Here are some examples:

# All tests be run in parallel (the default rule)
{ par => '**' },

# Run all tests in sequence, except those starting with "p"
{ par => 't/p*.t' },

# Run all tests in parallel, except those starting with "p"
{
    seq => [
              { seq => 't/p*.t' },
              { par => '**'     },
           ],
}

# Run some startup tests in sequence, then some parallel tests then some
# teardown tests in sequence.
{
    seq => [
        { seq => 't/startup/*.t' },
        { par => ['t/a/*.t','t/b/*.t','t/c/*.t'], }
        { seq => 't/shutdown/*.t' },
    ],
},

✅ Rules resolution

🎯 Glob-style pattern matching for rules

We implement our own glob-style pattern matching. Here are the patterns it supports:

🔧 Instance Methods

TAP::Parser::Scheduler
📛 NAME 🚀 Quick Reference 📦 VERSION 📝 SYNOPSIS 📖 DESCRIPTION 🛠️ METHODS
🔧 Class Methods 📐 Rules data structure 🔧 Instance Methods

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-22 08:54 @216.73.216.206
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^