[interchange-docs] xmldocs - docelic modified 2 files

Kevin Walsh kevin at cursor.biz
Wed Jun 21 09:56:35 EDT 2006


docs at icdevgroup.org wrote:
> User:      docelic
> Date:      2006-06-20 22:53:42 GMT
> Modified:  glossary scratch variable
> Log:
> * Write/update variable/scratch glossary entries
> 
> [snip]
>
> +		<row>
> +			<entry>$Tag-&gt;tmp('<replaceable>VARNAME</replaceable>');</entry>
> +			<entry>Mark scratch variable as temporary, must set a value afterwards</entry>
> +		</row>
>
You can don't have to set a temporary scratch in two steps,
as you suggested.  You can set it in one step with the following:

    $Tag->tmp({
        name => $name,
        body => $value,
    });

or similarly with positional parameters:

    $Tag->tmp($name, $attribute_hash_reference, $value);

That method should also be listed in the "GlobalSub code or UserTags"
table that follows your example.

>
> +		<row>
> +			<entry>$Session->{scratch}{<replaceable>VARNAME</replaceable>};</entry>
> +			<entry>Equivalent</entry>
> +		</row>
>
I don't think it's a good idea to tell people that "scratch" is a key
under the $Session hashref.  We have moved things around in there before,
and documenting that "scratch" is available in this way tends to give
people permission to use that method.  Everyone should be using $Scratch
to set scratchpad values.  I suggest that you either remove the reference
to $Session, or put a big "use $Scratch instead" warning in the text.

Anyway, it's good to see that some text is starting to appear in the docs,
so keep it up.

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


More information about the docs mailing list