
Perl Testing
This one walks you through Perl testing with Test2::V0 and Test::More, covering the full TDD cycle from red-green-refactor onwards. You get concrete examples of deep comparisons using hash and array builders, mocking with Test::MockModule (with clear warnings against monkey-patching), and coverage reports via Devel::Cover. The prove runner commands are practical, including parallel execution and state management for CI. Activate it when writing new Perl code or migrating legacy test suites. The subtest patterns and fixture setup examples are immediately useful, and the side-by-side Test::More versus Test2 comparisons make migration decisions straightforward.
- skills.sh installs
- 5.4K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill perl-testing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Perl Testing Patterns
Comprehensive testing strategies for Perl applications using Test2::V0, Test::More, prove, and TDD methodology.
When to Activate
- Writing new Perl code (follow TDD: red, green, refactor)
- Designing test suites for Perl modules or applications
- Reviewing Perl test coverage
- Setting up Perl testing infrastructure
- Migrating tests from Test::More to Test2::V0
- Debugging failing Perl tests
TDD Workflow
Always follow the RED-GREEN-REFACTOR cycle.
# Step 1: RED — Write a failing test
# t/unit/calculator.t
use v5.36;
use Test2::V0;
use lib 'lib';
use Calculator;
subtest 'addition' => sub {
my $calc = Calculator->new;
is($calc->add(2, 3), 5, 'adds two numbers');
is($calc->add(-1, 1), 0, 'handles negatives');
};
done_testing;
# Step 2: GREEN — Write minimal implementation
# lib/Calculator.pm
package Calculator;
use v5.36;
use Moo;
sub add($self, $a, $b) {
return $a + $b;
}
1;
# Step 3: REFACTOR — Improve while tests stay green
# Run: prove -lv t/unit/calculator.t
Test::More Fundamentals
The standard Perl testing module — widely used, ships with core.
Basic Assertions
use v5.36;
use Test::More;
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Category
- Testing & QA
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Nanoclaw Repl5.4K
- Messages Ops5.4K
- Recsys Pipeline Architect5.4K
- Latency Critical Systems5.3K
- Fsharp Testing5.3K
- Tinystruct Patterns5.3K
- Uncloud5.3K
- Parallel Execution Optimizer5.3K
- Prediction Market Oracle Research5.3K
- Prediction Market Risk Review5.3K
- Data Throughput Accelerator5.3K
- Recursive Decision Ledger5.3K
- Team Agent Orchestration5.1K
- Dynamic Workflow Mode5K
- Kubernetes Patterns4.9K
- Intent Driven Development4.8K
- Inherit Legacy Style4.8K
- Orch Build Mvp4.8K
- Codehealth Mcp4.8K
- Orch Pipeline4.8K
- Orch Add Feature4.8K
- Orch Refine Code4.8K
- Orch Fix Defect4.8K
- Orch Change Feature4.8K