Skip to content

About

Claude Code skill for safe, clear, tested Perl 5.36+ apps and modules. Built on affaan-m/ECC by @affaan-m.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-perl-patterns-plus

hero

License: MIT Stars Works with Claude Code Skill v1.0

Built on affaan-m/ECC by @affaan-m (260,309 stars, MIT). All credit for the original idea to them. This fork improves and repackages it; upstream license preserved in UPSTREAM_LICENSE.

A Claude Code skill for writing safe, clear, and easy-to-test modern Perl 5.36+ code.

💡 Why

Old Perl code can be hard to read and risky to change.

Modern Perl has safer forms for args, objects, data, and errors. Yet each app may use a different Perl version or set of modules.

This skill helps Claude check those limits first. It then gives clear patterns that fit your app.

It is for people who write, review, fix, or update Perl code. It also plugs into your current Claude Code flow.

🚀 Install

Run one command:

mkdir -p ~/.claude/skills/perl-patterns && curl -fsSL https://raw.githubusercontent.com/modern-perl-patterns-plus/modern-perl-patterns-plus/main/skill/SKILL.md -o ~/.claude/skills/perl-patterns/SKILL.md

The skill is one file. It has no setup step of its own.

🛠️ Usage

Ask Claude Code to review or write Perl with the skill:

Use the perl-patterns skill to update this sub for Perl 5.36.
Keep its public API the same. Explain any risk before you edit it.

sub label {
    my ($text) = @_;
    $text = 'none' unless defined $text;
    return $text;
}

Expected output:

use v5.36;

sub label($text = undef) {
    $text //= 'none';
    return $text;
}

Claude should first check the app's Perl version, tests, modules, public API, and deploy needs. It should explain that a signature default is used only when an arg is missing. The //= line also handles an explicit undef.

🔄 What we changed vs upstream

  • Rewrote the main notes from Japanese into plain, short English.
  • Added clear copyright credit for ECC.
  • Added checks to run before a change. These cover the target Perl version, current modules, tests, public APIs, and deploy needs.
  • Added clear notes about undef, signature defaults, named args, context-based APIs, and type checks.
  • In the improved version described for this fork, the old sections on error handling, Try::Tiny, Perl 5.40 try and catch, and object code with Moo were removed.

📜 License

This project is available under the MIT License.

The upstream MIT license and copyright notice are preserved in UPSTREAM_LICENSE.

About

Claude Code skill for safe, clear, tested Perl 5.36+ apps and modules. Built on affaan-m/ECC by @affaan-m.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors