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.

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.

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.)

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).

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.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to