Mo::coerce - Adds the coerce feature to Mo's has
use Mo qw'coerce'; has name => ( coerce => sub { uc $_[0] } );
Adds the coerce parameter to has, which expects a code reference, which is used to transform the value to be set.
To install Mo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mo
CPAN shell
perl -MCPAN -e shell install Mo
For more information on module installation, please visit the detailed CPAN module installation guide.