Thanks for your reply, please look below for more queries. On Thu, Apr 23, 2009 at 12:27 PM, Chas. Owens <chas.ow...@gmail.com> wrote:
> On Thu, Apr 23, 2009 at 05:45, Raheel Hassan <raheel.has...@gmail.com> > wrote: > snip > > Can you please explain IO::Socket::SSL and DBD::mysql why we write in our > > programs these lines.. > snip > > IO::Socket::SSL is a module that lets you easily open SSL sockets. > See http://search.cpan.org/dist/IO-Socket-SSL/SSL.pm for more information. > > DBD::mysql is the database driver that lets DBI connect to MySQL. > See http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm for more > information. > Ok got it > > snip > >> perl -MModule::Name -le 'print "ok"' > > > > I have written this command perl -DBD::Mysql -le > > and received this response "Recompile perl with -DDEBUGGING to use -D > switch > > (did you mean -d ?) > > Unrecognized switch: -::Mysql (-h will show valid options). > > " > snip > > That is because you did not run the right command. You should have said > > perl -MDBD::mysql -le 'print "ok"' > > The switch is -M and its argument is the module name. You also misspelled > the module name. It is DBD::mysql, not DBD::Mysql. Thanks yes it works now. One more think when i tried to check any other modules like, 1-perl -MCrypt::SSLeay -le 'print "ok"' or 2-perl -MMIME-Base64 -le 'print "ok"' or 3-perl -MIO::Socket::SSL -le 'print "ok"' It prompts this error. Can you please explain how can i read and understand this problem and what changes do i need to make to remove this error. *Can't locate Crypt/SSLeay.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .). BEGIN failed--compilation aborted.* *Can't locate IO/Socket/SSL.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .). BEGIN failed--compilation aborted.* > > snip > >> If you get "ok" back then it is installed, if you get back an error then > >> either it is not installed or you need to set PERL5LIB to point to where > it > >> is installed. > > > > How i will set the PERL5LIB to point where it is installed. > snip > > export PERL5LIB=/path/to/install/directory > > It would probably be a good idea to put that in whatever you use as a > startup > script for your shell (e.g. ~/.profile, ~/.bash_profile, ~/.bashrc, etc.) Please explain this more, when i installed the perl i did not set any path so perl installed on the default location and for executing the perl scripts i use this (#!/usr/bin/perl) line first. Do you want that i will change my first line? and i could not find PERL5LIB where is this folder? > > > snip > >> There are multiple methods of installing modules. In order of my > >> preference: > >> > >> * use a package manager: > >> > >> apt-get install libdbi-perl > > > > For adding MySql support which modules do i need to add.Because at CPAN > web > > site when i searched DBD and DBI there are many modules available. > snip > > You need DBI, DBD::mysql, and any modules they depend on (I don't believe > they > are dependent on any other modules, but I cannot am not certain). Ok got it > > snip > >> * compile from a tarball > >> > >> 1. download a tarball from CPAN > >> 2. decompress tarball > >> 3. change directory into the extracted tarball > > > > Is it manadaotry > snip > > Is what mandatory? Compiling from a tarball is one option. You can > also install > from a package manager or by using the cpan commmand (which automates these > steps and downloads the dependencies). > > snip > >> > >> 4. perl Makefile.PL > > > > What is the function of makefile.pl > snip > > You must, simply must, begin paying attention to the casing of text. > The name of > the script is Makefile.PL not makefile.pl. Makefile.PL is part of the > ExtUtils::MakeMaker (or a compatible) module. It is a Perl program that > knows > how to look at your system, determine if it is okay to install the module, > and write a custom Makefile for your machine. If you are familiar > with compiling > open source packages, it is similar to the configure script. > > See http://search.cpan.org/dist/ExtUtils-MakeMaker for more information. > > -- > Chas. Owens > wonkden.net > The most important skill a programmer can have is the ability to read. >