DBI Module

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SAIRAAM
    New Member
    • Feb 2007
    • 45

    DBI Module

    Hi

    I Am Just A Beginer Of Perl.. I Just Want My Perl Coding To Connect To A Database... For Which They Specify I Need To Create A Dbi Module Can U Help Me In Creating A Dbi Module
  • miller
    Recognized Expert Top Contributor
    • Oct 2006
    • 1086

    #2
    You do not need to create a DBI Module to connect to a database. You simply need to install the module provided by CPAN.

    Comment

    • SAIRAAM
      New Member
      • Feb 2007
      • 45

      #3
      referred that website but my system says its not able to download dbi module what am i to do

      Comment

      • SAIRAAM
        New Member
        • Feb 2007
        • 45

        #4
        I Want To Know About Packages... That Is How Can I Save Pm Files And Pl Files... How Am I To Run Them Separetely.....
        Where I Need To Store Them In My Folder......

        Comment

        • SAIRAAM
          New Member
          • Feb 2007
          • 45

          #5
          Perl

          Hello Can Any One Help Me In Telling How Packages Can Be Saved And Compiled In Perl... That Is How Should I Save A Pm File And Pl File... Do These Files Need To Be Saved In Same Folder... It Would Helpful If I Gety Clear Idea As I Dont Know Any Issues In This From Scrap...

          Comment

          • SAIRAAM
            New Member
            • Feb 2007
            • 45

            #6
            Packages

            Can U Help Me Out In How To Deal With Packeges In Perl..
            That Is How Should I Save A .pm Extension File And .pl Extension File.... As I Am Totally New It Would Be If The Details Are Simple...and Very Easy Top Understand.....

            Comment

            • vpmurdan
              New Member
              • Feb 2007
              • 25

              #7
              Hi.
              For the creation of .pm files look at the following site:

              http://www.perlmonks.o rg/index.pl?node_i d=431702

              :
              For the directory to put your module:
              1. you can put in any directory.
              2. The directory should be appended to the '@INC' variable

              Comment

              • KevinADC
                Recognized Expert Specialist
                • Jan 2007
                • 4092

                #8
                Asking the same question over and over is not going to get a reply.

                First, you don't need to compile perl modules or perl scripts.

                Second, the question is a bit out of the scope of a help forum. Get some perl references and start reading is my best suggestion. "Perl BookShelf References" on CD is a good source of information.

                Comment

                • SAIRAAM
                  New Member
                  • Feb 2007
                  • 45

                  #9
                  Hi Vpmurdan...

                  I Referred To The Site U Refered To... Saw How Module Has To Be Created... Can U Guide Me As To How I Can Use The Existing Module... Eg Dbi Module.. And Secondly U Suggested Me To Append My Directory To @inc. Can U Suggest How Can I Do That... .

                  Comment

                  • vpmurdan
                    New Member
                    • Feb 2007
                    • 25

                    #10
                    For appending to @INC: Type the following code in a command-line perl to see how the append works and apply to your program:

                    Code:
                    print @INC;
                    push(@INC, "c:/prakash/temp");
                    print @INC;
                    
                    Ctrl+d

                    For using a module:
                    use the following:

                    Code:
                    use moduleName;
                    Just see any sample

                    Comment

                    • miller
                      Recognized Expert Top Contributor
                      • Oct 2006
                      • 1086

                      #11
                      Originally posted by vpmurdan
                      For appending to @INC: Type the following code in a command-line perl to see how the append works and apply to your program:

                      Code:
                      print @INC;
                      push(@INC, "c:/prakash/temp");
                      print @INC;
                      
                      Ctrl+d
                      Unless there is a specific reason why you need to modify the @INC at runtime, do not use this method for adding a directory to the @INC.

                      Instead, always use the lib pragma. This is performed at compile time, and does a few sanity checks that you can read about in the included link to the documentation:

                      Code:
                      use lib "c:/prakash/temp";

                      Comment

                      • SAIRAAM
                        New Member
                        • Feb 2007
                        • 45

                        #12
                        module

                        I Have Downloaded A Dbi Module... Can Anyone Help Me Saying Where Am I To Put That Module So That I Can Access It For My Perl Program

                        Comment

                        • docsnyder
                          New Member
                          • Dec 2006
                          • 88

                          #13
                          Originally posted by SAIRAAM
                          I Have Downloaded A Dbi Module... Can Anyone Help Me Saying Where Am I To Put That Module So That I Can Access It For My Perl Program
                          You should read the documentation supplied with the module.
                          Code:
                          gunzip <module>.tar.gz
                          tar xvf <module>.tar
                          cd <module>
                          perl Makefile.PL
                          make
                          make test
                          make install
                          Greetz, Doc

                          Comment

                          • SAIRAAM
                            New Member
                            • Feb 2007
                            • 45

                            #14
                            Sir I Tried Ur Code But It Shows Some Error Where Am I To Type This Code.... Should A Perl Script Be Created For Installation Of Dbi Module.... Can U Suggest Some Idea...

                            Comment

                            • SAIRAAM
                              New Member
                              • Feb 2007
                              • 45

                              #15
                              SIR I GOT TILL writing makefile for dbi..... after which when i try to execute these three lines of code it says

                              make
                              make test
                              make install

                              when i type make it says not recognised as internel or external command,operabl e file or batch file.......what should i do.... can u suggest me..

                              Comment

                              Working...