1Mo::chain(3)          User Contributed Perl Documentation         Mo::chain(3)
2
3
4

Name

6       Mo::chain - Adds the chain feature to Mo's has
7

Synopsis

9           package Foo;
10
11           use Mo qw'chain';
12           has first  => ( chain => 1 );
13           has second => ( chain => 1 );
14
15           Foo->new->first('1')->second('2');
16

Description

18       Adds the chain parameter to has. If you set it to a true value, the
19       accessor will return the class instance if values are set, instead of
20       the value itself.  As a result, accessors can be chained.
21
22
23
24perl v5.34.0                      2021-07-22                      Mo::chain(3)
Impressum