To install namespace::lexical, copy and paste the appropriate command in to your terminal.
cpanm
cpanm namespace::lexical
CPAN shell
perl -MCPAN -e shell
install namespace::lexical
For more information on module installation, please visit the detailed CPAN module installation guide.