Catmandu::Sane(3pm)
π Catmandu::Sane π
okay bestie, so this is Catmandu::Sane β it's a Perl module (you'll find it in the User Contributed Perl Documentation section of your man pages), and honestly? It's giving "I don't want to type the same six use lines ever again" energy. It's package boilerplate, and it slays.
β¨ NAME β¨
Catmandu::Sane β Package boilerplate π
πΈ SYNOPSIS πΈ
use Catmandu::Sane;
# Provides all the 5.10 features.
say("what");
given($foo) {
when(1) { say "1" }
when([2,3]) { say "2 or 3" }
when(/abc/) { say "has abc" }
default { none of the above }
}
sub next_id{
state $id;
++$id;
}
# Provides try/catch[/finally] try/catch_case[/finally]
try {
} catch {};
# Provides
Catmandu::Error->throw("error");
Catmandu::BadVal->throw("eek val");
Catmandu::BadArg->throw("eek arg");
Catmandu::NotImplemented->throw("can't do that!");
π¦ DESCRIPTION π¦
It's the package boilerplate bestie, and it's exactly equivalent to writing all of this out by hand:
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use IO::File ();
use IO::Handle ();
use Try::Tiny::ByClass;
use Catmandu::Error;
likeβ¦ imagine typing that every single time. not me. π so instead you do use Catmandu::Sane; and you get all of it, no cap. π
β¨ cute little sign-off β¨ this page was rendered from perl v5.40.1, dated 2026-01-24, and it's the Catmandu::Sane(3pm) page β stay sane out there, bestie π«Άπ
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms