Skip to content
affaan-m avatar

Perl Patterns

Modern Perl 5.36+ idioms covering signatures, OO, error handling, regexes, and file I/O for maintainable apps.

CCM score
73 of 100
skills.sh installs
11.5K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers core idioms: use v5.36 preamble, subroutine signatures, postfix dereferencing, context sensitivity, and the isa operator
  • Includes error handling patterns (eval/die, Try::Tiny, native try/catch on 5.40+), Moo classes and roles, and the native class keyword on 5.38+
  • Enforces three-argument open with autodie and warns against two-argument open for shell injection safety
  • Designed for developers writing new Perl code, reviewing existing modules, or migrating pre-5.36 code to modern defaults

Install

$ npx -y skills add affaan-m/ecc --skill perl-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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.

# 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.

Details

Repository
github.com/affaan-m/ecc
First seen
Jul 14, 2026

Questions

What does the perl-patterns skill do?

The perl-patterns skill gives an agent modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications. It covers signatures, the v5.36 pragma, error handling, Moo classes, regular expressions, file I/O, and module layout.

How do I install the perl-patterns skill?

Run npx -y skills add affaan-m/ecc --skill perl-patterns -y in your project to install it. Once installed, the agent can apply these Perl 5.36+ patterns when writing or reviewing modern Perl code.

When should I use the perl-patterns skill?

Use it when writing new Perl modules, reviewing Perl code for idiom compliance, refactoring legacy Perl to modern standards, or migrating pre-5.36 code. It is meant as a starting point to adapt to your own app and dependency stack.

More from affaan-m/ecc

All 257

Similar to Perl Patterns