一键导入
perl-patterns
Modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots.
Clean Architecture patterns for Android and Kotlin Multiplatform projects -- module structure, dependency rules, UseCases, Repositories, and data layer patterns.
Performance baseline and regression detection -- page performance, API latency, build times, and before/after comparison.
Turn a one-line objective into a step-by-step construction plan for multi-session, multi-agent engineering projects. Each step has a self-contained context brief so a fresh agent can execute it cold.
Automated visual testing and interaction verification -- smoke tests, interaction tests, visual regression, and accessibility audits using browser automation.
Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.
| name | perl-patterns |
| description | Modern Perl 5.36+ idioms, best practices, and conventions for building robust, maintainable Perl applications. |
| origin | ECC |
Idiomatic Perl 5.36+ patterns and best practices for building robust, maintainable applications.
v5.36 Pragmause v5.36;
sub greet($name) {
say "Hello, $name!";
}
sub connect_db($host, $port = 5432, $timeout = 30) {
return DBI->connect("dbi:Pg:host=$host;port=$port", undef, undef, {
RaiseError => 1,
PrintError => 0,
});
}
my @users = $data->{users}->@*;
my @roles = $data->{users}[0]{roles}->@*;
use Try::Tiny;
my $user = try {
$db->resultset('User')->find($id) // die "User $id not found\n";
} catch {
warn "Failed to fetch user $id: $_";
undef;
};
package User;
use Moo;
use Types::Standard qw(Str Int ArrayRef);
has name => (is => 'ro', isa => Str, required => 1);
has email => (is => 'ro', isa => Str, required => 1);
has roles => (is => 'ro', isa => ArrayRef[Str], default => sub { [] });
sub is_admin($self) {
return grep { $_ eq 'admin' } $self->roles->@*;
}
1;
| Legacy Pattern | Modern Replacement |
|---|---|
use strict; use warnings; | use v5.36; |
my ($x, $y) = @_; | sub foo($x, $y) { ... } |
@{ $ref } | $ref->@* |
open FH, "< $file" | open my $fh, '<:encoding(UTF-8)', $file |
blessed hashref | Moo class with types |
$1, $2, $3 | $+{name} (named captures) |
new Foo() instead of Foo->new())