On Fri, Jun 15, 2007 at 04:36:51PM +0200, [EMAIL PROTECTED] wrote:
> 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>
<%once> blocks only run once (as the name implies), when the component is
loaded (see HTML::Mason::Devel). I'd only expect your first request to get the
$m->notes entry, and subsequent requests not to have it (until you restart your
server), because $m->notes is per-request.
You should put it in a <%perl> or <%init>.
> Is it normal that if I mispell PUBLIC_MAILROOT I don't get an error ?
> (I'm with the default strict pragma).
It's just a string, not a variable or function name. Perl has no idea that
it's misspelled. (perldoc strict)
hdp.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users