fields - compile-time class fields
{ package Foo; use fields qw(foo bar baz); } ... my Foo $var = new Foo; $var->{foo} = 42; # This will generate a compile-time error. $var->{zap} = 42;
The fields pragma enables compile-time verified class fields.
fields
To install lib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm lib
CPAN shell
perl -MCPAN -e shell install lib
For more information on module installation, please visit the detailed CPAN module installation guide.