Parent Category: Tutorials
Hits: 5221

There are many times when you need to install Perl modules and the CPAN install command uses
no command line arguments but you need.
For example you need to install DBD::mysql from the CPAN shell and you would like to do:
perl Makefile.PL --testdb=test --testuser=root --testpassword=supersecret --testhost=localhost
instead of just:
perl Makefile.PL
because installing DBD::mysql using the CPAN shell fails, as the connection to MySQL fails.
Use the look command inside the CPAN shell to customize command line arguments.
Enter the CPAN shell: 
perl -MCPAN -e shell
Open a subshell in the DBD::mysql directory (will download the module if not already downloaded): 
look DBD::mysql
Execute any command as you would installing the module "manually": 
perl Makefile.PL --testdb=test --testuser=root --testpassword=supersecret --testhost=localhost
make test
make install
Exit the subshell, return to CPAN shell: 
Exit the CPAN shell: 


We use Hosting and VPS Hosting, from:

We like and trust them.

Good prices, high security.