Mo::chain(3)
β¨ NAME β¨
Mo::chain β bestie, this is the module that adds the chain feature to Mo's has π
Like, it's giving "make your accessors link up like a little friendship bracelet." π
πΈ SYNOPSIS πΈ
package Foo;
use Mo qw'chain';
has first => ( chain => 1 );
has second => ( chain => 1 );
Foo->new->first('1')->second('2');
look at that last line. no semicolon chaos, no reassigning variables, just vibes and a chain of calls. iconic. π
π DESCRIPTION π
okay so here's the tea π β this module adds the chain parameter to has.
If you set chain to a true value, then the accessor will return the class instance whenever values are set β instead of returning the value itself. π
As a result, accessors can be chained. π¦
ngl that's the whole thing, bestie. one parameter, one behaviour flip, endless slay. β¨
and that's a wrap, mwah π this page came from perl v5.42.0, dated 2025-07-25, and it's filed under Mo::chain(3) β go forth and chain responsibly, fr fr π«Άπ
π¦ where this page comes from
- fedora 43: perl-Mo 0.40-28.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms