Files
athena/chezmoi/dot_claude/rules/ecc/perl/testing.md
T
Зарубин Филипп f219b1fc67 feat: Athena OS Фаза 2 — generic chezmoi-канон Мозга
chezmoi-source (чистая пересборка, не дамп 1.2 ГБ):
- dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен),
  settings.json.tmpl (deny-щит 20 + security-guard hook), rules
  (structure + ECC 21 язык), 30 generic ECC-агентов, health-check
- dot_codex: symlink-паритет; dot_agents: registry 13 скриптов
  HOME-генерик + методология docs
- плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install)
- launchd: health.plist (PATH-фикс 127) + session-reaper.example
- smoke++: secret-токен guard + канон-проверки (зелёный)
- 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
2026-06-15 16:59:09 +03:00

937 B

paths
paths
**/*.pl
**/*.pm
**/*.t
**/*.psgi
**/*.cgi

Perl Testing

This file extends common/testing.md with Perl-specific content.

Framework

Use Test2::V0 for new projects (not Test::More):

use Test2::V0;

is($result, 42, 'answer is correct');

done_testing;

Runner

prove -l t/              # adds lib/ to @INC
prove -lr -j8 t/         # recursive, 8 parallel jobs

Always use -l to ensure lib/ is on @INC.

Coverage

Use Devel::Cover — target 80%+:

cover -test

Mocking

  • Test::MockModule — mock methods on existing modules
  • Test::MockObject — create test doubles from scratch

Pitfalls

  • Always end test files with done_testing
  • Never forget the -l flag with prove

Reference

See skill: perl-testing for detailed Perl TDD patterns with Test2::V0, prove, and Devel::Cover.