Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re (tilly) 1: Variable Declaration

by tilly (Archbishop)
on Oct 19, 2001 at 16:12 UTC ( [id://119953]=note: print w/replies, xml ) Need Help??


in reply to Variable Declaration

I would write a module that gives back an open database handle to the scripts.

Simple need. Simple interface. Don't keep on rewriting the connect code. Don't duplicate information.

Replies are listed 'Best First'.
Re: Re (tilly) 1: Variable Declaration
by demerphq (Chancellor) on Oct 19, 2001 at 17:44 UTC
    I agree fully. I adopted this solution whch lead to inteminable arguments with my colleagues which I grew weary of and relented. The problems that occured by moving the data into an exporting module were many, and I sorely regretted giving way.

    So to reiterate. Create a class that represents an open connection to the database. Simple, effective, and minimizes code waste.

    Yves
    --
    You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)

      Well I cheated. I hid the data from the module that gave out the database handles into a config file, and I reexported that data to one other module.

      Turns out that some bulk database transfers were orders of magnitude faster with bcp, so I really did need the name/password. But only in one controlled situation...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://119953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found