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.
  • Comment on Re^2: storing database handle object in a variable

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.