Mo::chain(3)

πŸ“¦
version 0.40 Β· 2 versions
, in fedora 43

✨ 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