[ic] HTTP POST, getting a bit closer but not there yet
Kevin Walsh
interchange-users@icdevgroup.org
Fri Feb 14 11:08:01 2003
Marc Brevoort [marc.brevoort@armazemdedados.com] wrote:
> >
> > Answer 2: Call the code via usertag or [calc].
> > [tag-that-does-runtime-require]
> > -or-
> > [calc] q{[tag-that-does-runtime-require]} [/calc]
> >
> Okay, that overcomes the Safe trap, but now I can't dynamically pass
> parameters to the function anymore. The IC list tells that that can
> be solved by using $Tag->myusertag($param1,$param2) but then safe mode
> starts complaining again :/ Is there any workaround for this?
>
One workaround is to use scratchpad values and a second [calc] region:
[calcn]
#
# make decisions here and set up some argument scratches
#
$scratch->{somearg} = 'somevalue' if $CGI->{whatever};
undef;
[/calcn]
[calc]
#
# call the unsafe tag from here, passing all arguments
# (even if some or all of them are blank)
#
my $result = q{[runtime-require-tag somearg="[scratchd somearg]"]};
#
# process the result here, in the separate calc/perl region.
#
undef;
[/calc]
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/