[ic] [set] or [tmp] but show=1 also??

Mike Heins interchange-users@icdevgroup.org
Fri Apr 11 23:54:01 2003


Quoting Paul Jordan (paul@gishnetwork.com):
> 
> Hi guys,
> 4.9.7
> 
> I am wondering if it is possible... instead of:
> 
> [set newval]Hello[/set]
>          [scratch newval] Paul
> ....
> ..
> ...      [scratch newval] Paul
> ...      [scratch newval] Paul
> 
> 
> If I can just do:
> 
>     [set name=newval show=1]Hello[/set] Paul
> ....
> .
> ....
> ....    [scratch newval] Paul
> ...     [scratch newval] Paul
> 
> 
> The above is obviously simplified. The initial non outputting [set] seems
> wasted. Any ideas?? Or is this a non issue WRT efficiency? It is for the
> building of redundant "mini control panels" that need to be repeated several
> times.
> 

The set tag is completely brain-dead simple. You can do your
own real easy:

UserTag setshow             Order        name
UserTag setshow             hasEndTag
UserTag setshow             PosNumber    1
UserTag setshow             Routine <<EOR
sub {
    my($var,$val) = @_;
    $Scratch->{$var} = $val;
}
EOR

Doesn't even have to be global.

	[setshow newval]Paul[/setshow]

And can still be shown with [scratch newval] later.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Light travels faster than sound. This is why some people appear bright
until you hear them speak. -- unknown