1Mo::coerce(3) User Contributed Perl Documentation Mo::coerce(3)
23
4
Name
6Mo::coerce - Adds the coerce feature to Mo's has
7
Synopsis
9use Mo qw'coerce';
10has name => ( coerce => sub { uc $_[0] } );
11
Description
13Adds the coerce parameter to has, which expects a code reference, which
14is used to transform the value to be set.
1516
17
18
perl v5.32.0 2020-07-28 Mo::coerce(3)