On Fri, 15 Jun 2007, [EMAIL PROTECTED] wrote:

[EMAIL PROTECTED] a écrit :
....
With this code, it *sometimes* works as expected :
....
I declare my constant in the only autohandler :

<%once>
        use DBI;
        use DBD::Pg;
        my $dbh;
        $m->notes('PUBLIC_MAILROOT' => '/var/www/sites/semi/dlm');
</%once>
the $m->notes are cleared on each request, and %once blocks are run once
per child.  try moving that bit to an %init block, which is run on each
request.

Just to give the general rule that I use, I put "use" statements in %once, and everything else in %init.


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: [EMAIL PROTECTED] | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to