hi,
>
>     I thinks this one's for you Gerald... I want my perl module to know
> when it is being called by an embperl page and when the page's finished.
>
>     I can't count with BEGIN and END because the interpreter persistent,
> allright, but is there any sub I can declare that will catch calls when
> Embperl starts/ends executing the page.
>

You can define a sub named CLEANUP in every Embperl page. That will be call
after the request is finish and the connection to the browser has been
closed. As the name suggest, a good place for cleaning up (like closing
database handles). But I guess that's not what you want. To get your module
called every time any Embperl is requested, use EmbperlObject, there you can
define a base page that looks like:

base.htm:

[- $obj = new whatever::module ; -]

[- $obj -> init -]

[- Execute ('*') ; # This calls the page -]

[- $obj -> term -]

in your httpd.conf

PerlSetEnv EMBPERL_OBJECT_BASE base.htm
PerlHandler HTML::EmbperlObject

of course you can do much more with EmbperlObject.

Gerald



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to