S
sam
Hi,
I would like to do something like C in Perl. Sorry, I m not expert in Perl.
I m writng a webmin module that manage the Cyrus email accounts.
But every time when need to change the Cyrus user account info, I need
to use the Cyrus::IMAP::Admin->new() method login Cyrus first.
How can I login Cyrus once and keep its returned reference for another
..cgi file used? (I won't keep plaintext password in perl or
configuration file either, so if imap is not login by Cyrus admin, user
need to login Cyrus admin account first).
For example, if I have already invoked $imap = &imap_connect() in the
index.cgi file, another cgi file (set_quota.cgi) no need to call the
method imap_connect() again, instead, it will somehow use the reference
of imap created in the index.cgi file and just call $imap->setquota().
Not sure if use Global declaration is a good idea. I don't want this
reference to be "boardcast". I found command ENV is a way to get the
value of the enviornment variable, but don't think this is a secure way
to get the reference of the object in this case.
Thanks
Sam.
I would like to do something like C in Perl. Sorry, I m not expert in Perl.
I m writng a webmin module that manage the Cyrus email accounts.
But every time when need to change the Cyrus user account info, I need
to use the Cyrus::IMAP::Admin->new() method login Cyrus first.
How can I login Cyrus once and keep its returned reference for another
..cgi file used? (I won't keep plaintext password in perl or
configuration file either, so if imap is not login by Cyrus admin, user
need to login Cyrus admin account first).
For example, if I have already invoked $imap = &imap_connect() in the
index.cgi file, another cgi file (set_quota.cgi) no need to call the
method imap_connect() again, instead, it will somehow use the reference
of imap created in the index.cgi file and just call $imap->setquota().
Not sure if use Global declaration is a good idea. I don't want this
reference to be "boardcast". I found command ENV is a way to get the
value of the enviornment variable, but don't think this is a secure way
to get the reference of the object in this case.
Thanks
Sam.