Install Perl CPAN Modules

For creating interesting scripts using perl, CPAN modules are essential. Say for web scraping WWW::Mechanize is an essential module. We can download and install cpan modules by logging into shell prompt as follows.:
1) In windows laptop, type cmd in search box
2) Try logging into cpan cshell as follows :
C:Userssh>perl -MCPAN -e install
It looks like you don't have a C compiler and make utility installed.  Trying to install dmake and the MinGW gcc compiler using the Perl Package Manager.This may take a a few minutes...
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Downloading MinGW-5.1.4.1...done
Downloading dmake-4.11.20080107...done
Unpacking MinGW-5.1.4.1...done
Unpacking dmake-4.11.20080107...done
Generating HTML for MinGW-5.1.4.1...done
Updating files in site area...done
1070 files installed
Please use the `dmake` program to run commands from a Makefile!
Set up gcc environment - 3.4.5 (mingw-vista special r3)
After the installation is over, lets install a module say WWW::Mechanize for example. Here are the steps :
C:Userssh>perl -MCPAN -e shell
Set up gcc environment - 3.4.5 (mingw-vista special r3)
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan> install WWW::Mechanize
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
Going to read 'C:Perlcpansourcesauthors1mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Going to read 'C:Perlcpansourcesmodules2packages.details.txt.gz'
Database was generated on Sat, 19 Jun 2010 21:27:00 GMT
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Going to read 'C:Perlcpansourcesmodules3modlist.data.gz'
............................................................................DONE
Going to write C:PerlcpanMetadata
Running install for module 'WWW::Mechanize'
Running make for P/PE/PETDANCE/WWW-Mechanize-1.62.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/P/PE/PETDANCE/WWW-Mechanize-1.62.ta
r.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/P/PE/PETDANCE/CHECKSUMS
Checksum for C:PerlcpansourcesauthorsidPPEPETDANCEWWW-Mechanize-1.62.ta
r.gz ok
Scanning cache C:Perl/cpan/build for sizes
DONE
WWW-Mechanize-1.62/
WWW-Mechanize-1.62/Makefile.PL
WWW-Mechanize-1.62/lib/
WWW-Mechanize-1.62/lib/WWW/
WWW-Mechanize-1.62/lib/WWW/Mechanize/
WWW-Mechanize-1.62/lib/WWW/Mechanize/FAQ.pod
WWW-Mechanize-1.62/lib/WWW/Mechanize/Examples.pod
WWW-Mechanize-1.62/lib/WWW/Mechanize/Image.pm
WWW-Mechanize-1.62/lib/WWW/Mechanize/Cookbook.pod
WWW-Mechanize-1.62/lib/WWW/Mechanize/Link.pm
WWW-Mechanize-1.62/lib/WWW/Mechanize.pm
WWW-Mechanize-1.62/META.yml
WWW-Mechanize-1.62/MANIFEST
WWW-Mechanize-1.62/perlcriticrc
WWW-Mechanize-1.62/bin/
WWW-Mechanize-1.62/bin/mech-dump
WWW-Mechanize-1.62/t/
WWW-Mechanize-1.62/t/link.t
WWW-Mechanize-1.62/t/mech-dump/
WWW-Mechanize-1.62/t/mech-dump/mech-dump.t
WWW-Mechanize-1.62/t/new.t
WWW-Mechanize-1.62/t/find_inputs.t
WWW-Mechanize-1.62/t/TestServer.pm
WWW-Mechanize-1.62/t/find_link.html
WWW-Mechanize-1.62/t/find_link_id.html
WWW-Mechanize-1.62/t/find_inputs.html
WWW-Mechanize-1.62/t/link-relative.t
WWW-Mechanize-1.62/t/select.t
WWW-Mechanize-1.62/t/google.html
WWW-Mechanize-1.62/t/find_link_id.t
WWW-Mechanize-1.62/t/image-parse.t
WWW-Mechanize-1.62/t/credentials.t
WWW-Mechanize-1.62/t/find_frame.html
WWW-Mechanize-1.62/t/add_header.t
WWW-Mechanize-1.62/t/warnings.t
WWW-Mechanize-1.62/t/field.html
WWW-Mechanize-1.62/t/find_image.t
WWW-Mechanize-1.62/t/clone.t
WWW-Mechanize-1.62/t/link-base.t
WWW-Mechanize-1.62/t/area_link.html
WWW-Mechanize-1.62/t/die.t
WWW-Mechanize-1.62/t/live/
WWW-Mechanize-1.62/t/live/wikipedia.t
WWW-Mechanize-1.62/t/live/encoding.t
WWW-Mechanize-1.62/t/cookies.t
WWW-Mechanize-1.62/t/field.t
WWW-Mechanize-1.62/t/credentials-api.t
WWW-Mechanize-1.62/t/image-parse.html
WWW-Mechanize-1.62/t/find_frame.t
WWW-Mechanize-1.62/t/untaint.t
WWW-Mechanize-1.62/t/pod.t
WWW-Mechanize-1.62/t/local/
WWW-Mechanize-1.62/t/local/click_button.t
WWW-Mechanize-1.62/t/local/overload.t
WWW-Mechanize-1.62/t/local/get.t
WWW-Mechanize-1.62/t/local/reload.t
WWW-Mechanize-1.62/t/local/submit.t
WWW-Mechanize-1.62/t/local/failure.t
WWW-Mechanize-1.62/t/local/form.t
WWW-Mechanize-1.62/t/local/log-server
WWW-Mechanize-1.62/t/local/LocalServer.pm
WWW-Mechanize-1.62/t/local/back.t
WWW-Mechanize-1.62/t/local/click.t
WWW-Mechanize-1.62/t/local/referer.t
WWW-Mechanize-1.62/t/local/referer-server
WWW-Mechanize-1.62/t/local/page_stack.t
WWW-Mechanize-1.62/t/local/follow.t
WWW-Mechanize-1.62/t/form-parsing.t
WWW-Mechanize-1.62/t/00-load.t
WWW-Mechanize-1.62/t/aliases.t
WWW-Mechanize-1.62/t/upload.t
WWW-Mechanize-1.62/t/taint.t
WWW-Mechanize-1.62/t/frames.t
WWW-Mechanize-1.62/t/image-new.t
WWW-Mechanize-1.62/t/regex-error.t
WWW-Mechanize-1.62/t/autocheck.t
WWW-Mechanize-1.62/t/frames.html
WWW-Mechanize-1.62/t/Tools.pm
WWW-Mechanize-1.62/t/warn.t
WWW-Mechanize-1.62/t/tick.html
WWW-Mechanize-1.62/t/select.html
WWW-Mechanize-1.62/t/find_link-warnings.t
WWW-Mechanize-1.62/t/pod-coverage.t
WWW-Mechanize-1.62/t/tick.t
WWW-Mechanize-1.62/t/save_content.t
WWW-Mechanize-1.62/t/upload.html
WWW-Mechanize-1.62/t/find_link.t
WWW-Mechanize-1.62/t/area_link.t
WWW-Mechanize-1.62/etc/
WWW-Mechanize-1.62/etc/www-mechanize-logo.png
WWW-Mechanize-1.62/Changes
CPAN.pm: Going to build P/PE/PETDANCE/WWW-Mechanize-1.62.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
WWW::Mechanize likes to have a lot of test modules for some of its tests.
The following are modules that would be nice to have, but not required.
Test::Pod
Test::Memory::Cycle
Test::Warn
Test::Taint
Checking if your kit is complete...
Looks good
Warning: prerequisite Test::Warn 0.11 not found.
Writing Makefile for WWW::Mechanize
---- Unsatisfied dependencies detected during ----
----    PETDANCE/WWW-Mechanize-1.62.tar.gz    ----
Test::Warn [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Test::Warn'
Running make for C/CH/CHORNY/Test-Warn-0.21.zip
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/C/CH/CHORNY/Test-Warn-0.21.zip
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/C/CH/CHORNY/CHECKSUMS
Checksum for C:PerlcpansourcesauthorsidCCHCHORNYTest-Warn-0.21.zip ok
CPAN.pm: Going to build C/CH/CHORNY/Test-Warn-0.21.zip
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Warning: prerequisite Tree::DAG_Node 0 not found.
Writing Makefile for Test::Warn
---- Unsatisfied dependencies detected during ----
----         CHORNY/Test-Warn-0.21.zip        ----
Tree::DAG_Node [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Tree::DAG_Node'
Running make for C/CO/COGENT/Tree-DAG_Node-1.06.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/C/CO/COGENT/Tree-DAG_Node-1.06.tar.
gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/C/CO/COGENT/CHECKSUMS
Checksum for C:PerlcpansourcesauthorsidCCOCOGENTTree-DAG_Node-1.06.tar.
gz ok
Tree-DAG_Node-1.06/
Tree-DAG_Node-1.06/ChangeLog
Tree-DAG_Node-1.06/lib/
Tree-DAG_Node-1.06/lib/Tree/
Tree-DAG_Node-1.06/lib/Tree/DAG_Node.pm
Tree-DAG_Node-1.06/Makefile.PL
Tree-DAG_Node-1.06/MANIFEST
Tree-DAG_Node-1.06/MANIFEST.SKIP
Tree-DAG_Node-1.06/META.yml
Tree-DAG_Node-1.06/README
Tree-DAG_Node-1.06/t/
Tree-DAG_Node-1.06/t/00_about_verbose.t
Tree-DAG_Node-1.06/t/01_old_junk.t
CPAN.pm: Going to build C/CO/COGENT/Tree-DAG_Node-1.06.tar.gz
Set up gcc environment - 3.4.5 (mingw-vista special r3)
Checking if your kit is complete...
Looks good
Writing Makefile for Tree::DAG_Node
cp lib/Tree/DAG_Node.pm bliblibTreeDAG_Node.pm
COGENT/Tree-DAG_Node-1.06.tar.gz
C:Perlsitebindmake.exe -- OK
Running make test
C:Perlbinperl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bliblib',
'blibarch')" t/*.t
t/00_about_verbose.t .. ok
t/01_old_junk.t ....... ok
All tests successful.
Files=2, Tests=3,  0 wallclock secs ( 0.06 usr +  0.11 sys =  0.17 CPU)
Result: PASS
COGENT/Tree-DAG_Node-1.06.tar.gz
C:Perlsitebindmake.exe test -- OK
Running make install
Prepending C:PerlcpanbuildTree-DAG_Node-1.06-kJ_YUH/blib/arch C:Perlcpanb
uildTree-DAG_Node-1.06-kJ_YUH/blib/lib to PERL5LIB for 'install'
Installing C:PerlhtmlsitelibTreeDAG_Node.html
Installing C:PerlsitelibTreeDAG_Node.pm
Appending installation info to C:Perllib/perllocal.pod
COGENT/Tree-DAG_Node-1.06.tar.gz
C:Perlsitebindmake.exe install  -- OK
Running make for C/CH/CHORNY/Test-Warn-0.21.zip
Has already been unwrapped into directory C:PerlcpanbuildTest-Warn-0.21-jnggM5
CPAN.pm: Going to build C/CH/CHORNY/Test-Warn-0.21.zip
cp Warn.pm bliblibTestWarn.pm
CHORNY/Test-Warn-0.21.zip
C:Perlsitebindmake.exe -- OK
Running make test
C:Perlbinperl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bliblib',
'blibarch')" t/*.t
t/1.t ............... ok
t/carped.t .......... ok
t/pod.t ............. skipped: Test::Pod 1.14 required for testing POD
t/warning_is.t ...... ok
t/warning_like.t .... ok
t/warnings_are.t .... ok
t/warnings_exist.t .. Use of uninitialized value $output in substitution (s///)
at t/warnings_exist.t line 11.
Use of uninitialized value $output in substitution (s///) at t/warnings_exist.t
line 12.
Use of uninitialized value $output in split at t/warnings_exist.t line 13.
Use of uninitialized value $lines[0] in pattern match (m//) at t/warnings_exist.
t line 14.
t/warnings_exist.t .. 1/? #   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'warn_2 at t/warnings_exist1.pl line 12.'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'ok 1'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'ok 2'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'warn_2 at t/warnings_exist1.pl line 21.'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'not ok 3'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'warn_2 at t/warnings_exist1.pl line 27.'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'ok 4'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'warn_2 at t/warnings_exist1.pl line 31.'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'not ok 5'
Use of uninitialized value $this in pattern match (m//) at t/warnings_exist.t li
ne 31.
#   Failed test at t/warnings_exist.t line 31.
#                   undef
#     doesn't match '(?-xism:^Use of uninitialized value (?:$as+)?in addition
(+) at t/warnings_exist1.pl line 36.$)'
#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: 'ok 6'

#   Failed test at t/warnings_exist.t line 34.
#          got: undef
#     expected: '1..6'
# Looks like you failed 12 tests of 12.
t/warnings_exist.t .. Dubious, test returned 12 (wstat 3072, 0xc00)
...........................................