On Thu, Sep 19, 2002 at 09:23:46PM +1000, Angus Lees wrote:
> since you're importing, the code/functions will be run in the same
> "namespace" as the page doing the Execute.
>
> thus you can only do $req=shift in either the Executing page or the
> Executed page, since they're shifting the same @_ array.
>
> ie: continue to do $req=shift in your Executing page. remove
> $req=shift from your Executed page, and just continue using $req
> anyway.
I tried that, but it does not work... The values in $req are
undefined as soon as I try to access them in a sub.
This is exactly what I wrote, $req->{log} is defined in the
application object:
mainpage:
[- $req = shift; -]
[- Execute ({inputfile => 'functions.epo', import => 1}); -]
[-
logprint ("bla bla bla"); # <- this is the function
print OUT "my log: $req->{log}"; # here it works
-]
functions.epo:
[$ sub logprint $]
<p>passed values: [+$_[0]+]</p>
<p>logfile: [-print OUT "my log(sub): $req->{log}"; # here not -]</p>
[$ endsub $]
Andre
--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]