Class:...e::Fast(3pm)

πŸ“¦
version 0.11 Β· 2 versions
  • 0.11 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.11 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Class::Accessor::Lvalue::Fast β€” bestie, this is the module that makes simplified Lvalue accessors πŸ’…

(and yeah, the manual page lives in section 3pm, the Perl module pages, in case you were wondering where we at πŸŽ€)


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, fr fr:

package Foo;
use base qw( Class::Accessor::Lvalue::Fast );
__PACKAGE__->mk_accessors(qw( bar ))

my $foo = Foo->new;
$foo->bar = 42;
print $foo->bar; # prints 42

look at that. $foo->bar = 42; β€” assigning straight into an accessor. no setter call, no ->bar(42), just the assignment operator doing its little thing. iconic behavior, honestly 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

So the way this works is: this module subclasses Class::Accessor::Fast, and the whole reason it exists is to hand you lvalue accessors. That's it, that's the plot πŸ’–

(If you're like "wait, subclassess" β€” yeah the original says subclassess, we're not touching that, it's part of the lore 😭)


πŸ‘‘ AUTHOR πŸ‘‘

Richard Clamp <richardc@unixbeard.net> β€” the main character who wrote this 🫑


Copyright (C) 2003 Richard Clamp. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, permissive licensing, we love to see it ⭐


🌈 SEE ALSO 🌈

  • Class::Accessor::Fast β€” the parent, the blueprint, the origin story
  • Want β€” the other one, go look at it too

okay bestie that's the whole page!! this one's from perl v5.34.0, dated 2022-06-10, and it's part of the User Contributed Perl Documentation for section 3pm πŸ’– go forth and lvalue, you've got this 🧚✨

πŸ“¦ where this page comes from