SIMPLE SOLUTIONS

ACCESSORS::CHAINED(3PM) - Linux man page online | Library functions

Create method chaining accessors in caller's package.

Chapter
2015-06-07
accessors::chained(3pm) User Contributed Perl Documentation accessors::chained(3pm)

NAME

accessors::chained - create method chaining accessors in caller's package.

SYNOPSIS

package Foo; use accessors::chained qw( foo bar baz ); my $obj = bless {}, 'Foo'; # generates chaining accessors: $obj->foo( 'hello ' ) ->bar( 'world' ) ->baz( "!\n" ); print $obj->foo, $obj->bar, $obj->baz;

DESCRIPTION

The accessors::chained pragma lets you create simple method-chaining accessors at compile- time. This module exists for future backwards-compatability - if the default style of accessor ever changes, method-chaining accessors will still be available through this pragma. See accessors for documentation.

AUTHOR

Steve Purkis <@cpan.org>

SEE ALSO

accessors, accessors::classic, base
perl v5.20.2 2015-06-07 accessors::chained(3pm)
Download raw manual
Main page User Contributed Perl Documentation (+23303) perl v5.20.2 (+3124) № 3 (+68044)
Go top