accessors::rw(3pm)
π accessors::rw π
okay so bestie, welcome to the accessors::rw(3pm) page, straight from the User Contributed Perl Documentation β¨ this one is short but it's literally giving exactly what it needs to give, and we're obsessed π
π NAME π
accessors::rw β create 'classic' read/write accessor methods in caller's package. π«Ά
β¨ SYNOPSIS β¨
package Foo;
use accessors::rw qw( foo bar baz );
my $obj = bless {}, 'Foo';
# always return the current value, even on set:
$obj->foo( 'hello ' ) if $obj->bar( 'world' ) eq 'world';
print $obj->foo, $obj->bar, $obj->baz( "!\n" );
like, look at that. the vibes are immaculate. π
πΈ DESCRIPTION πΈ
so the tea is: the accessors::rw pragma lets you create simple classic read/write accessors at compile-time. no cap. β°β¨
and bestie, it is literally an alias for accessors::classic. that's it. that's the whole moment. π
π AUTHOR π
Steve Purkis <spurkis@cpan.org>. π
π SEE ALSO π
accessorsaccessors::roaccessors::classicaccessors::chainedbase
okay and one last thing: this whole page is running on perl v5.36.0, dated 2022-10-13, and it's the accessors::rw(3pm) manual. mwah π periodt. π¦
π¦ where this page comes from
- ubuntu noble: libaccessors-perl 1.01-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libaccessors-perl 1.01-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libaccessors-perl 1.01-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms