[ic] instant reparse?

Kevin Walsh interchange-users@icdevgroup.org
Wed Feb 19 11:46:02 2003


Marc Brevoort [marc.brevoort@armazemdedados.com] wrote:
> > > 
> > > The following script shows a problem that I have.
> > > 
> > > [perl]
> > >     $url=$CGI->{myurl};
> > >     $params=$CGI->{myparam};
> > >     my $page="[set result][posttourl $url $params][/set]";
> > >     return $page;
> > > [perl]
> > >
> > Try [seti result][posttourl $url $params][/seti]
> > 
> Wonderful, that did the trick, just what I needed! Thanks!
> 
With that being the case, why do you need that Perl block at all?
The 'return $page' will always return an empty string.  If it
was supposed to hold returned XML data then the quotes would
probably clash with the XML contents anyway.

Couldn't you simply use the following instead (with no [perl] block)?

    [seti result][posttourl url="[cgi myurl]" params="[cgi myparams]"][/seti]

Or even this:

    [calc]
        $Scratch->{result} = qq([posttourl $CGI->{myurl} $CGI->{myparam}]);
        undef;
    [/calc]

I'm assuming the names of your UserTag's parameters, so correct them
as required.

By the way, I'd use [tmp] instead of [seti], if the result is only
for use on the current page.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/