MooX::...ildArgs(3pm)

πŸ“¦
version 0.1.2 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

🌸 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 the build_args() method from MooX::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