Challenge 1: A Moo Class — Possible Solution ==================================================================== package Book; use Moo; has 'title' => (is => 'ro', required => 1); has 'read' => (is => 'rw', default => sub { 0 }); package main; use strict; use warnings; use feature 'say'; my $book = Book->new(title => "Perl Fundamentals"); say $book->read; # 0 $book->read(1); say $book->read; # 1 Output: 0 1 WHY THIS WORKS AS AN ANSWER ------------------------------ has 'title' => (is => 'ro', required => 1); reuses the chapter's own attribute-declaration syntax exactly — is => 'ro' generates a getter only, and required => 1 means Book->new(...) will die if title isn't supplied, both reused directly from the chapter's own examples. has 'read' => (is => 'rw', default => sub { 0 }); reuses is => 'rw' to generate BOTH a getter and a setter (needed here since the challenge requires updating it later), and default => sub { 0 } reuses the chapter's own coderef-wrapped default pattern from its warn-box — even though 0 is a plain immutable value here (not a mutable reference like the warn-box's own [] example), wrapping it in sub {...} still matches Moo's own required syntax for defaults. Book->new(title => "Perl Fundamentals") supplies only title, leaving read to fall back to its default (0) — say $book->read; confirms this, printing 0. $book->read(1); reuses the generated SETTER that is => 'rw' provides — calling the accessor WITH an argument updates the attribute — and the second say $book->read; confirms it changed to 1, demonstrating the read-write behavior the challenge specifically asks for.