Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Mail::IMAPTalk and mod_perl

by kirillm (Friar)
on Aug 18, 2008 at 22:56 UTC ( [id://705091]=note: print w/replies, xml ) Need Help??


in reply to Mail::IMAPTalk and mod_perl

You have:

if ( ! exists $our_cache_imap_object ) {

there. exists checks if a hask or array element does exist. You should rather check whether the object is defined, e.g.:

if ( ! defined $our_cache_imap_object ) {

Mail::IMAPTalk's constructor supports being passed a reference to a Socket. You can do some magic with that. You might want to take a look at Socket::PassAccessRights, which you could use to pass sockets to an external daemon, which would ensure that the connection is not lost and get the sockets back agian.

Replies are listed 'Best First'.
Re^2: Mail::IMAPTalk and mod_perl
by avo (Pilgrim) on Aug 19, 2008 at 08:06 UTC
    Sorry, copy - paste mistake... I was just making a small example of what the real program does. The real program keeps the objects into a hash. In other words $our_cache_imap_object is actually $our_cache_imap_object{$login$userid}. When copying and pasting I never read carefully what I am publishing. The case is checking for defined actually. Do you know whether I can somehow open a shared (per module) socket upon loading of the module by Apache in mod_perl environment?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2025-06-23 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.