in reply to Re: DB Connections across scripts from a module
in thread DB Connections across scripts from a module

Hi proceng,
I am declaring it globally, so i guess, the var does not go out of context and also, i am able to access the var from other subs..

As JavaFan had stated, the connection is closed when the first script A's execution is complete.. And for the next script to execute, (as it is executed a bit later) we need to initiate a new connection.. Perl modules get unloaded and loaded back in the memory(for every script execution), i guess..
If i have said something wrong, please correct me

Regards,
Blub:)
  • Comment on Re^2: DB Connections across scripts from a module

Replies are listed 'Best First'.
Re^3: DB Connections across scripts from a module
by ikegami (Patriarch) on Jun 07, 2010 at 05:28 UTC

    If i have said something wrong

    Most definitely. It's not clear what since I don't know how you invoke each script.

    If the process in which script A executed exited, then the var did go out of scope contrary to what you said.

    If the process in which script A executed did not exit, then no modules got unloaded contrary to what you said.