Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: storing database handle object in a variable

by chilukuri_perl (Novice)
on Dec 09, 2009 at 10:57 UTC ( [id://811889]=note: print w/replies, xml ) Need Help??


in reply to Re: storing database handle object in a variable
in thread storing database handle object in a variable

Sorry to miss the point. This sored database handle object will be used in other script. i.e. it should be persistent for another script.

Replies are listed 'Best First'.
Re^3: storing database handle object in a variable
by Gangabass (Vicar) on Dec 09, 2009 at 11:28 UTC

    Why you want this? May be you better think about separating connection code in a module?

Re^3: storing database handle object in a variable
by scorpio17 (Canon) on Dec 09, 2009 at 14:56 UTC
    For persistent database connections, I think you should take a look at using mod_perl or FastCGI, along with something like Apache::DBI. Regular scripts will close the database connection when they exit. I don't think there's anyway to avoid that.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found