Files
everything-claude-code/docs/zh-CN/rules/perl/hooks.md
2026-03-13 17:45:44 +08:00

24 lines
519 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
paths:
- "**/*.pl"
- "**/*.pm"
- "**/*.t"
- "**/*.psgi"
- "**/*.cgi"
---
# Perl 钩子
> 本文件在 [common/hooks.md](../common/hooks.md) 的基础上扩展了 Perl 相关的内容。
## PostToolUse 钩子
`~/.claude/settings.json` 中配置:
* **perltidy**:编辑后自动格式化 `.pl``.pm` 文件
* **perlcritic**:编辑 `.pm` 文件后运行代码检查
## 警告
* 警告在非脚本 `.pm` 文件中使用 `print` — 应使用 `say` 或日志模块(例如,`Log::Any`