MooX::...ildArgs(3pm)
πΈ NAME πΈ
MooX::Role::CloneSet::BuildArgs β bestie, it makes updated copies of truly immutable objects. That's the whole gig. β¨
Oh and hey, this is from the User Contributed Perl Documentation for MooX::...ildArgs(3pm) β yes the title got chopped mid-word, she's mysterious like that, we love her anyway π
π¦ SYNOPSIS π¦
package Someone;
use Moo;
with 'MooX::Role::CloneSet::BuildArgs';
has name => (
is => 'ro',
);
has race => (
is => 'ro',
);
package main;
my $first = Someone->new(name => 'Drizzt', race => 'drow');
my $hybrid = $first->cset(race => 'dwarf');
my $final = $weird->cset(name => 'Catti-brie', race => 'human');
π DESCRIPTION π
Okay so MooX::Role::CloneSet::BuildArgs is a role that's basically the twin sister of MooX::Role::CloneSet β like, same vibe, same energy, one tiny difference and it's everything: her cset() method does not go digging for the current values of the object's attributes. Nope. She uses the ones the object was constructed with, via MooX::BuildArgs. Iconic behaviour honestly π«Ά
π METHODS π
cset(field => value, ...)β shallowly clones the object and makes the changes you asked for to its attributes. Slay. π
β οΈ Heads up bestie: this method gets the names and values of the object's attributes by calling thebuild_args()method fromMooX::BuildArgs. So it really depends on the fact that none of the attributes has had its value changed since the object was constructed. Like, truly depends on it. No cap. π
π LICENSE π
SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net> SPDX-License-Identifier: Artistic-2.0
π§ AUTHOR π§
Peter Pentchev <roam@ringlet.net> β thank you for your service, king π
And that's a wrap, babe! πΈ This page came to you courtesy of perl v5.40.1, dated 2026-01-06, filed under MooX::...ildArgs(3pm). Go forth and clone immutably, mwah π β¨
π¦ where this page comes from
- ubuntu resolute: libmoox-role-cloneset-perl 0.1.2-1 Β· Artistic-2.0
- ubuntu stonking: libmoox-role-cloneset-perl 0.1.2-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms