Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# CLAUDE.md

Guidelines for AI agents working on this repository.

## Project overview

Net::Daemon is a Perl CPAN module providing a base class for implementing TCP/IP daemons.
It supports forking, ithreads, and single-connection server modes with built-in logging,
config file handling, and access control.

- **Primary module**: `lib/Net/Daemon.pm`
- **Submodules**: `lib/Net/Daemon/Log.pm` (logging), `lib/Net/Daemon/Test.pm` (test support)
- **License**: Perl 5 (Artistic or GPL)
- **Minimum Perl**: 5.006

## Build and test

```bash
perl Makefile.PL # Generate Makefile (ExtUtils::MakeMaker)
make # Build
make test # Run test suite
make disttest # Build dist and test it
make manifest # Regenerate MANIFEST
```

## Generated files -- do not edit

- **`MANIFEST`** -- Generated by `make manifest`. Do not manually edit or re-sort.
- **`README.md`** -- Generated by running `pod2markdown` on the primary module file
(`lib/Net/Daemon.pm`). Do not edit directly; update the POD in the module instead.

## Releases and versioning

Releases are performed **manually by the human maintainer**. Fixes and PRs must never:

- Bump the version number (`$VERSION` in `lib/Net/Daemon.pm`)
- Update `ChangeLog`
- Modify release-related metadata

These are handled exclusively during the release process.

## Code style

- Perl code is formatted with `perltidy` (see `.perltidyrc` for settings)
- 4-space indentation, 400-character line limit
- Use `strict` and `warnings` in all Perl files

## Test suite

- Tests live in `t/` and use `Test::More`
- The test harness uses `Net::Daemon::Test` for server/client test infrastructure
- Several tests require fork or ithread support and will skip on unsupported platforms
- CI runs on Linux (Perl 5.8+), macOS, and Windows via GitHub Actions

## Repository structure

```
lib/Net/Daemon.pm # Main module
lib/Net/Daemon/Log.pm # Logging support
lib/Net/Daemon/Test.pm # Test infrastructure
t/ # Test suite
t/server # Test server script
Makefile.PL # Build configuration
cpanfile # Dependency declarations
ChangeLog # Release history (human-maintained)
AI_POLICY.md # AI usage policy for this project
.github/workflows/ # CI configuration
```
Loading