perl-testing

使用Test2::V0、Test::More、prove runner、模拟、Devel::Cover覆盖率和TDD方法的Perl测试模式。

Content Preview
---
name: perl-testing
description: 使用Test2::V0、Test::More、prove runner、模拟、Devel::Cover覆盖率和TDD方法的Perl测试模式。
origin: ECC
---

# Perl 测试模式

使用 Test2::V0、Test::More、prove 和 TDD 方法论为 Perl 应用程序提供全面的测试策略。

## 何时激活

* 编写新的 Perl 代码(遵循 TDD:红、绿、重构)
* 为 Perl 模块或应用程序设计测试套件
* 审查 Perl 测试覆盖率
* 设置 Perl 测试基础设施
* 将测试从 Test::More 迁移到 Test2::V0
* 调试失败的 Perl 测试

## TDD 工作流程

始终遵循 RED-GREEN-REFACTOR 循环。

```perl
# Step 1: RED — Write a failing test
# t/unit/calculator.t
use v5.36;
use Test2::V0;

use lib 'lib';
use Ca
How to Use

Recommended: Install to project (local)

mkdir -p .claude/skills
curl -o .claude/skills/perl-testing.md \
  https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/zh-CN/skills/perl-testing/SKILL.md

Skill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.

Alternative: Clone full repo

git clone https://github.com/affaan-m/everything-claude-code

Then reference at docs/zh-CN/skills/perl-testing/SKILL.md

Related Skills