[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] once block executing repeatedly
From:       Jeremy Blain <jeremy () belent ! com>
Date:       2004-12-14 23:40:48
Message-ID: 41BF7A00.6070709 () belent ! com
[Download RAW message or body]

David Baird wrote:

> Enrique Pérez Arnaud wrote:
>
>> my mason application seems to execute a once block in the topmost 
>> autohandler
>> almost each time I call a page.
>
>
> Yes, the once block executes once _per_request_ (i.e. not once per 
> server restart). You'll need to find some other mechanism for running 
> code on server or server-child startup. Sounds like it should be in a 
> startup.pl script (if this is mod_perl).
>
> d.
>
That should be once, when the component is loaded. (which means 
once/apache child in a standard
mod_perl environment)
The docs mention pre-loading the component to have it loaded by the 
parent, and inherited by
the children. 

http://www.masonhq.com/docs/manual/Devel.html#__once_


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic