Class::...Chained(3)
π Class::...Chained(3) β the manual, but make it make sense π
okay so welcome to Class::...Chained(3), bestie, fresh out of the User Contributed Perl Documentation pile. The actual module is Class::Accessor::Chained, and the vibe is: chained accessors. Slay. π
β¨ NAME β¨
Class::Accessor::Chained β make chained accessors. That's the whole assignment. π
π SYNOPSIS π
package Foo;
use base qw( Class::Accessor::Chained );
__PACKAGE__->mk_accessors(qw( foo bar baz ));
my $foo = Foo->new->foo(1)->bar(2)->baz(4);
print $foo->bar; # prints 2
no cap, that chain is iconic. π₯
π¦ DESCRIPTION π¦
A chained accessor is literally the main-character accessor: it always returns the object when you call it with parameters (that's the setting era), and it returns the value of the field when you call it with no arguments (that's the getting era). π«Ά
This module subclasses Class::Accessor in order to provide the same mk_accessors interface. Same interface, chained behaviour. Periodt. β¨
π AUTHOR π
Richard Clamp <richardc@unixbeard.net> wrote this. Respect the icon. π
π COPYRIGHT π
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. Legal cutie behaviour, fr fr. π
π SEE ALSO π
Class::Accessorβ go read this next, bestie.Class::Accessor::Chained::Fastβ and this one too. π
signing off with the deets: this page is from perl v5.42.0, dated 2010-12-01, and the manual name is Class::...Chained(3). mwah π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Class-Accessor-Chained 0.01-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- opensuse-leap 16.0: perl-Class-Accessor-Chained 0.01-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- opensuse-leap 16.0: perl-Class-Accessor-Chained 0.01-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- opensuse-leap 16.0: perl-Class-Accessor-Chained 0.01-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms