Sign in
Explore
Skills · SkillWriting & ContentReviewed

perl-patterns

Modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications. Use when writing or reviewing modern Perl 5.36+ code.

Kind
Skill
Works with
Claude Code, Codex
Source
affaan-m/ECC @ d3b8a3e90890
Path
skills/perl-patterns/SKILL.md
License
MIT
Jobs
Review, Documentation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Modern Perl Development Patterns

Idiomatic Perl 5.36+ patterns and best practices for building robust, maintainable applications.

## When to Activate

- Writing new Perl code or modules
- Reviewing Perl code for idiom compliance
- Refactoring legacy Perl to modern standards
- Designing Perl module architecture
- Migrating pre-5.36 code to modern Perl

## How It Works

Apply these patterns as a bias toward modern Perl 5.36+ defaults: signatures, explicit modules, focused error handling, and testable boundaries. The examples below are meant to be copied as starting points, then tightened for the actual app, dependency stack, and deployment model in front of you.

## Core Principles

### 1. Use `v5.36` Pragma

A single `use v5.36` replaces the old boilerplate and enables strict, warnings, and subroutine signatures.

```perl
# Good: Modern preamble
use v5.36;

sub greet($name) {
    say "Hello, $name!";
}

# Bad: Legacy boilerplate
use strict;
use warnings;
use feature 'say', 'signatures';
no warnings 'experimental::signatures';

sub greet {
    my ($name) = @_;
    say "Hello, $name!";
}
```

### 2. Subroutine Signatures

Use signatures for clarity and automatic arity checking.
…