Challenge 2: Fix the Mutable Default — Possible Solution ==================================================================== Given (buggy): has 'tags' => (is => 'rw', default => []); Fixed: has 'tags' => (is => 'rw', default => sub { [] }); One-sentence explanation: default => [] builds exactly ONE arrayref at attribute-declaration time, which every instance that doesn't supply its own tags would then share and mutate together, exactly like Course 1, Chapter 2's mutable-default-argument gotcha resurfacing in Moo's own attribute system. WHY THIS WORKS AS AN ANSWER ------------------------------ The fix reuses the chapter's own warn-box correction directly and unchanged — wrapping the empty arrayref in sub { [] } instead of writing default => [] on its own defers building the arrayref until each individual object is actually constructed, per the chapter's own explanation, giving every instance a genuinely independent, fresh reference rather than one shared one. The explanation reuses the chapter's own root-cause framing almost word for word: "the exact same root cause as Course 1, Chapter 2's mutable-default-argument gotcha, resurfacing in a new form" — a single mutable object gets created once and shared where independent copies were actually intended, the identical underlying mistake this course has now shown surfacing in two genuinely different contexts (a plain subroutine parameter back in Course 1, and now a Moo attribute declaration here), reinforcing that it's one general principle rather than two unrelated rules to memorize separately.