1accessors::chained(3) User Contributed Perl Documentationaccessors::chained(3)
2
3
4

NAME

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

SYNOPSIS

10         package Foo;
11         use accessors::chained qw( foo bar baz );
12
13         my $obj = bless {}, 'Foo';
14
15         # generates chaining accessors:
16         $obj->foo( 'hello ' )
17             ->bar( 'world' )
18             ->baz( "!\n" );
19
20         print $obj->foo, $obj->bar, $obj->baz;
21

DESCRIPTION

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

AUTHOR

33       Steve Purkis <spurkis@cpan.org>
34

SEE ALSO

36       accessors, accessors::classic, base
37
38
39
40perl v5.28.0                      2018-07-15             accessors::chained(3)
Impressum