Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Why was it neccessary to pass a DBI handler by reference?

by BrowserUk (Patriarch)
on Jan 28, 2004 at 17:29 UTC ( [id://324717]=note: print w/replies, xml ) Need Help??


in reply to Why was it neccessary to pass a DBI handler by reference?

This is an off-the-wall guess. Have you, or could you, re-try the original code outside of the fast CGI environment?

Knowing nothing about fast CGI, I read CGI::Fast POD (which may or may not be related) and saw that it is a "persistant environment" that

Each time there's a new request, CGI::Fast returns a CGI object to your loop. The rest of the time your script waits in the call to new(). When the server requests that your script be terminated, new() will return undef. You can of course exit earlier if you choose. A new version of the script will be respawned to take its place...

The possibility struck me that this is involved somehow. It seems possible that the "spawning" process might be duplicating the parameters and causing the loss of magic somewhere. And that by passing a reference, it means that it is the reference that is duplicated, pointing to the existing blessed $dbh, and so the magic is retained?

Like I say, pure speculation....


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!

  • Comment on Re: Why was it neccessary to pass a DBI handler by reference?

Replies are listed 'Best First'.
Re: Re: Why was it neccessary to pass a DBI handler by reference?
by kudra (Vicar) on Jan 29, 2004 at 14:36 UTC
    Thank you for your suggestion. I did, however, run the application in an ordinary CGI environment when I noticed the problem. This did not lead to any change.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-16 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found