On Thu, Sep 19, 2002 at 03:15:12PM +0200, Andre Landwehr wrote:
<snip>
> [- $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 $]
I did something similiar, but used 'isa' from Execute and OO method call
for my function to pass around the $req object.
calling page:
[-
$req = shift;
Execute ({isa=>'lib.epl'})
-]
[-
$req->some_func_like_logprint("hello")
-]
lib.epl:
[-
sub some_func_like_logprint {
my $req = shift;
my $msg = shift;
print OUT "The Req log should be: ", $req->{log}, "<br />";
}
-]
Perhaps this approach might help, as I think it will give the same
functionality.
Cameron
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]