[docs] xmldocs - docelic modified 3 files

docs at icdevgroup.org docs at icdevgroup.org
Tue Mar 8 06:43:14 EST 2005


User:      docelic
Date:      2005-03-08 11:43:14 GMT
Modified:  refs     base-url.tag calc calcn.tag
Log:
Rolling the stone slowly..

Revision  Changes    Path
1.2       +30 -0     xmldocs/refs/base-url.tag


rev 1.2, prev_rev 1.1
Index: base-url.tag
===================================================================
RCS file: /var/cvs/xmldocs/refs/base-url.tag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- base-url.tag	17 Feb 2005 23:25:39 -0000	1.1
+++ base-url.tag	8 Mar 2005 11:43:13 -0000	1.2
@@ -0,0 +1,30 @@
+__NAME__ purpose
+retrieve value of the VendURL directive
+__END__
+
+__NAME__ see also
+AutoVariable
+__END__
+
+
+__NAME__ synopsis
+&ROW_INTERPOLATE_0;
+&ROW_REPARSE_1;
+__END__
+
+
+__NAME__ description
+The tag simply returns the value of the &conf-VendURL; directive.
+__END__
+
+__NAME__ notes
+Similar and more general behavior can be achieved using
+&conf-AutoVariable;.
+__END__
+
+__NAME__ example: Retrieving VendURL
+<programlisting>
+Catalog base URL is: [base-url]
+</programlisting>
+__END__
+



1.2       +52 -1     xmldocs/refs/calc


rev 1.2, prev_rev 1.1
Index: calc
===================================================================
RCS file: /var/cvs/xmldocs/refs/calc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- calc	2 Feb 2005 11:35:59 -0000	1.1
+++ calc	8 Mar 2005 11:43:13 -0000	1.2
@@ -1,12 +1,32 @@
+__NAME__ purpose
+evalute the enclosed arithmetic expression or Perl block
+__END__
+
+__NAME__ synopsis
+&ROW_INTERPOLATE_1;
+&ROW_REPARSE_1;
+__END__
 
 __NAME__ see also
 calc, mvasp, perl
 __END__
 
+__NAME__ description
+The tag evaluates the enclosed arithmetic expression or a &PERL; block.
+The last expression evaluated (return value) is returned to the client
+page.
+</para><para>
+Note that Perl blocks can be of arbitrary content and complexity, and there
+really are no typical examples to show.
+__END__
+TODO note about safe, note about doc on Perl programming within IC
+
+
 __NAME__ notes
 <!-- if you change this, also change the same in refs/perl -->
 The &tag-calc; tag is lower-overhead variant of &tag-perl;, because it
-does not accept arguments, does not try to interpolate tag body, does not
+does not accept arguments, does not try to interpolate tag body (well, 
+&tag-calcn; tag only) , does not
 pre-open any database tables, and it doesn't do any extra wrapping.
 </para><para>
 The &tag-calc; tag will remember variable values inside the page, so you
@@ -15,4 +35,35 @@
 also visible in all further &tag-calc; blocks on the same page. 
 </para><para>
 There is no reason to ever use this tag inside &tag-perl; or &tag-mvasp;.
+</para><para>
+&tag-calc; and &tag-perl; are the two tags that play major role in any
+&PERL; programming within &IC;.
 __END__
+
+__NAME__ example: Simple Perl code, a random arithmetic expression
+<programlisting>
+Current magic number is: [calc]2+rand[/calc]
+</programlisting>
+__END__
+
+__NAME__ example: Retrieving an Interchange session value
+<programlisting>
+Welcome, your user name is [calc]$Tag->data(qw/session username/)[/calc]
+</programlisting>
+__END__
+
+__NAME__ example: Setting and displaying a value
+<programlisting>
+Order number is:
+  [calc] $Session->{mv_order_number} = $Values->{mv_order_number} [/calc]
+</programlisting>
+__END__
+
+__NAME__ example: Clearing the return value
+You can clear the return value (that is, return nothing) by simply calling
+<code>return</code> with no arguments:
+<programlisting>
+[calc] my $a = 5; return [/calc]
+</programlisting>
+__END__
+



1.2       +37 -0     xmldocs/refs/calcn.tag


rev 1.2, prev_rev 1.1
Index: calcn.tag
===================================================================
RCS file: /var/cvs/xmldocs/refs/calcn.tag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- calcn.tag	17 Feb 2005 23:25:39 -0000	1.1
+++ calcn.tag	8 Mar 2005 11:43:13 -0000	1.2
@@ -0,0 +1,37 @@
+__NAME__ purpose
+evalute the enclosed arithmetic expression or Perl block
+__END__
+
+__NAME__ synopsis
+&ROW_INTERPOLATE_0;
+&ROW_REPARSE_1;
+__END__
+
+__NAME__ see also
+calc, mvasp, perl
+__END__
+
+__NAME__ description
+The tag evaluates the enclosed arithmetic expression or a Perl block.
+The last expression evaluated (return value) is returned back to the client
+page.
+</para><para>
+The tag is only a convenience and otherwise identical to &tag-calc;,
+except that it does not interpolate tag body by default.
+__END__
+
+
+__NAME__ notes
+See &tag-calc; for the complete documentation.
+__END__
+
+__NAME__ example: Simple non-interpolating block
+The example will, since &tag-calcn; is used, directly return the quoted 
+content unmodified, instead of evaluating to "TEST":
+<programlisting>
+[cgi name=test set=TEST hide=1]
+
+[calcn reparse=0] "[cgi test]" [/calcn]
+</programlisting>
+__END__
+








More information about the docs mailing list