You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ri...@hyperreal.org on 1999/07/06 14:31:26 UTC
cvs commit: modperl-site/embperl Features.pod.1.html Features.pod.cont.html conf.gif Changes.pod.1.html Changes.pod.2.html Changes.pod.cont.html Embperl.pod.1.html Embperl.pod.2.html Embperl.pod.3.html Embperl.pod.4.html Embperl.pod.5.html Embperl.pod.cont.html Faq.pod.3.html Faq.pod.cont.html Intro.pod.5.html Intro.pod.6.html Intro.pod.7.html Intro.pod.cont.html index.html
richter 99/07/06 05:31:26
Modified: embperl Changes.pod.1.html Changes.pod.2.html
Changes.pod.cont.html Embperl.pod.1.html
Embperl.pod.2.html Embperl.pod.3.html
Embperl.pod.4.html Embperl.pod.5.html
Embperl.pod.cont.html Faq.pod.3.html
Faq.pod.cont.html Intro.pod.5.html Intro.pod.6.html
Intro.pod.7.html Intro.pod.cont.html index.html
Added: embperl Features.pod.1.html Features.pod.cont.html conf.gif
Log:
Embperl Webpages - Changes
Revision Changes Path
1.71 +2 -10 modperl-site/embperl/Changes.pod.1.html
Index: Changes.pod.1.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Changes.pod.1.html,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- Changes.pod.1.html 1999/07/06 11:56:39 1.70
+++ Changes.pod.1.html 1999/07/06 12:31:16 1.71
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
-<TITLE>1.2b5_dev -- That's what currently under developement</TITLE>
+<TITLE>1.2b5 5 July 1999</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
</HEAD>
@@ -8,7 +8,7 @@
<blockquote>
<blockquote>
<H1><strong>
-<A NAME="1_2b5_dev_That_s_what_current">1.2b5_dev -- That's what currently under developement</a></strong></h1>
+<A NAME="1_2b5_BETA_5_July_1999">1.2b5 (BETA) 5 July 1999</a></strong></h1>
</blockquote>
</blockquote>
@@ -17,14 +17,6 @@
<blockquote>
<blockquote>
[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.cont.html">PREV (Revision History - Content)</a>] [<a href="Changes.pod.2.html">NEXT (1.2b4 (BETA) 15 Feb 1999)</a>] <br><hr>
-<P>
-Last Update: Tue Jul 6 13:56:35 1999 (MET)
-
-<P>
-NOTE: This version is only available via <A HREF="CVS.pod.1.html#INTRO">"CVS"</A>
-
-
-
<P>
<PRE> - Renamed __strdup and __strndup so there are no duplicate
symbols when compiling with glibc. Spotted by Michael Hall.
1.17 +2 -2 modperl-site/embperl/Changes.pod.2.html
Index: Changes.pod.2.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Changes.pod.2.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Changes.pod.2.html 1999/05/10 20:36:50 1.16
+++ Changes.pod.2.html 1999/07/06 12:31:17 1.17
@@ -16,7 +16,7 @@
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
-[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">PREV (1.2b5_dev -- That's what currently under developement)</a>] [<a href="Changes.pod.3.html">NEXT (1.2b3 (BETA) 22 Nov 1998)</a>] <br><hr>
+[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">PREV (1.2b5 (BETA) 5 July 1999)</a>] [<a href="Changes.pod.3.html">NEXT (1.2b3 (BETA) 22 Nov 1998)</a>] <br><hr>
<P>
<PRE> - fixed a problem that $req_rec was sometimes invalid on the
second call to the same page causing Embperl to SIGSEGV.
@@ -85,7 +85,7 @@
EMBPERL_COOKIE_PATH and EMBPERL_COOKIE_EXPIRES to configure the cookie
which holds the session id. Suggested by Cliff Rayman.
</PRE>
-<p>[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">PREV (1.2b5_dev -- That's what currently under developement)</a>] [<a href="Changes.pod.3.html">NEXT (1.2b3 (BETA) 22 Nov 1998)</a>] <br>
+<p>[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">PREV (1.2b5 (BETA) 5 July 1999)</a>] [<a href="Changes.pod.3.html">NEXT (1.2b3 (BETA) 22 Nov 1998)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
1.17 +3 -3 modperl-site/embperl/Changes.pod.cont.html
Index: Changes.pod.cont.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Changes.pod.cont.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Changes.pod.cont.html 1999/05/10 20:36:55 1.16
+++ Changes.pod.cont.html 1999/07/06 12:31:17 1.17
@@ -16,7 +16,7 @@
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
-[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">NEXT (1.2b5_dev -- That's what currently under developement)</a>] <br><HTML>
+[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">NEXT (1.2b5 (BETA) 5 July 1999)</a>] <br><HTML>
<HEAD>
<TITLE>Revision History - Content</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
@@ -28,7 +28,7 @@
<UL>
- <LI><A href="Changes.pod.1.html#1_2b5_dev_That_s_what_current">1.2b5_dev - That's what currently under developement</A>
+ <LI><A href="Changes.pod.1.html#1_2b5_BETA_5_July_1999">1.2b5 (BETA) 5 July 1999</A>
<LI><A href="Changes.pod.2.html#1_2b4_BETA_15_Feb_1999">1.2b4 (BETA) 15 Feb 1999</A>
<LI><A href="Changes.pod.3.html#1_2b3_BETA_22_Nov_1998">1.2b3 (BETA) 22 Nov 1998</A>
<LI><A href="Changes.pod.4.html#1_2b2_BETA_9_Nov_1998">1.2b2 (BETA) 9 Nov 1998</A>
@@ -60,7 +60,7 @@
<LI><A href="Changes.pod.30.html#0_10beta_Jan_18_1997">0.10beta Jan 18 1997</A>
</UL>
<!-- INDEX END -->
-<hr><p>[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">NEXT (1.2b5_dev -- That's what currently under developement)</a>] <br>
+<hr><p>[<a href="index.html">HOME</a>] [<a href="Changes.pod.cont.html">CONTENT</a>] [<a href="Changes.pod.1.html">NEXT (1.2b5 (BETA) 5 July 1999)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
1.8 +21 -0 modperl-site/embperl/Embperl.pod.1.html
Index: Embperl.pod.1.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.1.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Embperl.pod.1.html 1999/05/10 20:36:55 1.7
+++ Embperl.pod.1.html 1999/07/06 12:31:18 1.8
@@ -229,6 +229,12 @@
uses the same package name as in your last call, and only recompiles the
code if <STRONG>mtime</STRONG> has changed or is undefined.
+<DT><STRONG><A NAME="item_sub">sub</A></STRONG><DD>
+<P>
+Call the Embperl subroutine named by this parameter. Currently the
+subroutine must be in the same file or if it's in another file, the other
+file has to be imported first.
+
<DT><STRONG><A NAME="item_input">input</A></STRONG><DD>
<P>
Reference to a string which contains the source. <STRONG>inputfile</STRONG> must also be specified to give a name for the source. The name can be any
@@ -247,6 +253,21 @@
<DT><STRONG><A NAME="item_output">output</A></STRONG><DD>
<P>
Reference to a scalar where the output should be written to.
+
+<DT><STRONG><A NAME="item_import">import</A></STRONG><DD>
+<P>
+A value of zero tell's Embperl not to execute the page, but define all
+subrountines found inside. This is neccessary before calling them with
+Execute by the <STRONG>sub</STRONG>
+parameter or for an later import.
+
+<P>
+A value of one tell's Embperl to define to subrountines inside the file (if
+not already done) and to import them as perl subroutines into the current
+namespace.
+
+<P>
+See <STRONG>[$ sub $]</STRONG> metacommand and section about subroutines for more infos.
<DT><STRONG><A NAME="item_req_rec">req_rec</A></STRONG><DD>
<P>
1.10 +23 -5 modperl-site/embperl/Embperl.pod.2.html
Index: Embperl.pod.2.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.2.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Embperl.pod.2.html 1999/05/10 20:36:58 1.9
+++ Embperl.pod.2.html 1999/07/06 12:31:18 1.10
@@ -238,10 +238,24 @@
Normaly Embperl reports NOT_FOUND (404) if a file of length zero is
requested. With this option set Embperl will return an empty document.
+<DT><STRONG><A NAME="item_optKeepSrcInMemory">optKeepSrcInMemory = 524288 (only 1.2b5 and above)</A></STRONG><DD>
<P>
-<PRE>
-=back
-</PRE>
+Tells Embperl to keep the source file in memory and not reload it on every
+request. (The precompiled Perlcode is always kept in memory, regardless of
+this flag)
+
+<DT><STRONG><A NAME="item_optKeepSpaces">optKeepSpaces = 1048576 (only 1.2b5 and above) = 0x100000,</A></STRONG><DD>
+<P>
+Disable the removing of spaces and empty lines from the output. This is
+usefull for other sources then HTML.
+
+<DT><STRONG><A NAME="item_optOpenLogEarly">optOpenLogEarly = 2097152 (only 1.2b5 and above)</A></STRONG><DD>
+<P>
+This option causeses Embperl to open the logfile as soon as it is loaded
+into memory. You can use this when you load Embperl via PerlModule under
+Apache, to open the log as root instead of the non-privileged user Apache
+runs as. =back
+
<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="EMBPERL_DEBUG">EMBPERL_DEBUG</A></H2>
<P>
This is a bitmask which specifies what should be written to the log. The
@@ -347,14 +361,18 @@
Show every variable which is undef'd at the end of the request. For scalar
variables, the value before undef'ing is logged.
-<DT><STRONG><A NAME="item_dbgProfile">dbgProfile = 1048576</A></STRONG><DD>
+<DT><STRONG><A NAME="item_dbgProfile">dbgProfile = 1048576 (only 1.2b4 and above)</A></STRONG><DD>
<P>
When set every source line in the log file will also display the time until
request was started. (<STRONG>dbgSource</STRONG> must also be set)
-<DT><STRONG><A NAME="item_dbgSession">dbgSession = 2097152</A></STRONG><DD>
+<DT><STRONG><A NAME="item_dbgSession">dbgSession = 2097152 (only 1.2b4 and above)</A></STRONG><DD>
<P>
Enables logging of session transactions.
+
+<DT><STRONG><A NAME="item_dbgImport">dbgImport = 4194304 (only 1.2b5 and above)</A></STRONG><DD>
+<P>
+Show how subroutines are imported in other namesapces
</DL>
<P>
1.7 +55 -2 modperl-site/embperl/Embperl.pod.3.html
Index: Embperl.pod.3.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.3.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Embperl.pod.3.html 1999/05/10 20:36:59 1.6
+++ Embperl.pod.3.html 1999/07/06 12:31:19 1.7
@@ -361,6 +361,61 @@
NOTE 1: `use strict' within an Embperl document will only apply to the
block in which it occurs.
+<DT><STRONG><A NAME="item_sub">sub</A></STRONG><DD>
+<P>
+(Only Embperl 1.2b5 and above)
+
+<P>
+Defines a Embperl subroutine. Example:
+
+<P>
+<PRE> [$ sub foo $]
+ <p> Here we do something </p>
+ [$ endsub $]
+</PRE>
+<P>
+You can call this subroutine either as a normal Perl subroutine
+
+<P>
+<PRE> [- foo -]
+</PRE>
+<P>
+or via the HTML::Embperl::Execute function.
+
+<P>
+<PRE> [- Execute ('#foo') # short form -]
+ [- Execute ({ sub => 'foo'}) # long form -]
+</PRE>
+<P>
+The difference is that the Execute function will reset the internal states
+of Embperl like they were before the subrountine call, when the subroutine
+returns. Also Execute could handle recursive call, which currently not work
+when calling it as a Perl subroutine.
+
+<P>
+You may also pass Parameters to the subroutine:
+
+<P>
+<PRE> [$ sub foo $]
+ [- $p = shift -]
+ <p> Here we show the first parameter [+ $p +]</p>
+ [$ endsub $]
+</PRE>
+<P>
+<PRE>
+ [- foo ('value') -]
+</PRE>
+<P>
+If you have a couple of commonly used subroutines you can define then in
+one file and import them into the modules where they are neccesary:
+
+<P>
+<PRE> [- Execute ({ inputfile => 'mylib.htm', import => 1 }) -]
+</PRE>
+<P>
+This will import all subroutines from the file <EM>mylib.htm</EM> into the current page where they could call just as a normal Perl
+subroutine.
+
</DL>
<P>
<HR>
@@ -478,8 +533,6 @@
<P>
The TEXTAREA tag is treated exactly like other input fields.
-</DL>
-<DL>
<DT><STRONG><A NAME="item_META">META HTTP-EQUIV= ... </A></STRONG><DD>
<P>
<meta http-equiv= ... > will over-ride the corresponding http header.
1.6 +3 -0 modperl-site/embperl/Embperl.pod.4.html
Index: Embperl.pod.4.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.4.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Embperl.pod.4.html 1999/05/10 20:36:59 1.5
+++ Embperl.pod.4.html 1999/07/06 12:31:20 1.6
@@ -54,6 +54,9 @@
function.
<P>
+You can define expections to the cleanup rule with the hash <STRONG>%CLEANUP</STRONG>.
+
+<P>
If you like to do your own cleanup you can define a subroutine <STRONG>CLEANUP</STRONG>
in your document. This will be called right before the variables are
cleaned up, but after the connection to the client is closed.
1.9 +42 -0 modperl-site/embperl/Embperl.pod.5.html
Index: Embperl.pod.5.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.5.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Embperl.pod.5.html 1999/05/10 20:37:00 1.8
+++ Embperl.pod.5.html 1999/07/06 12:31:20 1.9
@@ -34,6 +34,7 @@
<LI><A href="Embperl.pod.5.html#OUT">OUT</A>
<LI><A href="Embperl.pod.5.html#_param">@param</A>
<LI><A href="Embperl.pod.5.html#_optXXX_dbgXXX">$optXXX $dbgXXX</A>
+ <LI><A href="Embperl.pod.5.html#_CLEANUP">%CLEANUP</A>
</UL>
<hr>
<P>
@@ -87,6 +88,21 @@
</PRE>
<P>
+When you have installed CGI.pm 2.46 or above you may also retrieve the
+filename (local filename, as it was on the browser side) and the
+informations provied by the CGI.pm uploadInfo function. To get the filename
+just print out the value of the correspondig <CODE>%fdat</CODE> entry,
+instead of using it as a filehandle. To get the uploadInfo you must two
+times dereference it.
+
+<P>
+<PRE> Example:
+</PRE>
+<P>
+<PRE> Filename: [+ $fdat{ImageName} +] <br>
+ Content-Type: [+ ${${$fdat{ImageName}}} -> {'Content-Type'} +] <br>
+</PRE>
+<P>
<HR>
<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="_ffld">@ffld</A></H2>
<P>
@@ -290,6 +306,32 @@
<P>
<PRE> [+ $dbgCmd +] # Output the state of the dbgCmd flag
</PRE>
+<P>
+There are a few exceptions, where the variables can only be read. Setting
+of such options must be done via the config-files. Read-only variables are:
+
+<DL>
+<DT><STRONG><A NAME="item__optDisableVarCleanup">$optDisableVarCleanup</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optSafeNamespace">$optSafeNamespace</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optOpcodeMask">$optOpcodeMask</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optDisableChdir">$optDisableChdir</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optEarlyHttpHeader">$optEarlyHttpHeader</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optDisableFormData">$optDisableFormData</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optAllFormData">$optAllFormData</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optRedirectStdout">$optRedirectStdout</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optAllowZeroFilesize">$optAllowZeroFilesize</A></STRONG><DD>
+<DT><STRONG><A NAME="item__optKeepSrcInMemory">$optKeepSrcInMemory</A></STRONG><DD>
+</DL>
+<P>
+<HR>
+<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="_CLEANUP">%CLEANUP</A></H2>
+<P>
+Embperl cleanups up only variables with are defined within the Embperl
+page. If you want Embperl to cleanup addtional variables you can add them
+to the hash %CLEANUP, with the key set to the variable name and the value
+set to one. The other way round you could prevent Embperl from cleaning up
+some variables, by adding them to this hash, with a values of zero.
+
<p>[<a href="index.html">HOME</a>] [<a href="Embperl.pod.cont.html">CONTENT</a>] [<a href="Embperl.pod.4.html">PREV (Variable scope and cleanup)</a>] [<a href="Embperl.pod.6.html">NEXT (Session handling)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
1.10 +1 -0 modperl-site/embperl/Embperl.pod.cont.html
Index: Embperl.pod.cont.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Embperl.pod.cont.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Embperl.pod.cont.html 1999/05/10 20:37:04 1.9
+++ Embperl.pod.cont.html 1999/07/06 12:31:20 1.10
@@ -91,6 +91,7 @@
<LI><A href="Embperl.pod.5.html#OUT">OUT</A>
<LI><A href="Embperl.pod.5.html#_param">@param</A>
<LI><A href="Embperl.pod.5.html#_optXXX_dbgXXX">$optXXX $dbgXXX</A>
+ <LI><A href="Embperl.pod.5.html#_CLEANUP">%CLEANUP</A>
</UL>
<LI><A href="Embperl.pod.6.html#Session_handling">Session handling</A>
1.9 +4 -0 modperl-site/embperl/Faq.pod.3.html
Index: Faq.pod.3.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Faq.pod.3.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Faq.pod.3.html 1999/06/11 20:18:29 1.8
+++ Faq.pod.3.html 1999/07/06 12:31:21 1.9
@@ -33,6 +33,7 @@
<LI><A href="Faq.pod.3.html#Why_are_Perl_blocks_broken_up_in">Why are Perl blocks broken up into single subroutines?</A>
<LI><A href="Faq.pod.3.html#Can_I_pass_QUERY_STRING_informat">Can I pass QUERY_STRING information to an HTML::Embperl::Execute call?</A>
<LI><A href="Faq.pod.3.html#How_to_include_other_files_into_">How to include other files into Embperl pages?</A>
+ <LI><A href="Faq.pod.3.html#EmbPerl_iteration_without_indexi">EmbPerl iteration without indexing</A>
<LI><A href="Faq.pod.3.html#How_to_display_arrays_with_undef">How to display arrays with undef values in it?</A>
</UL>
<hr>
@@ -298,6 +299,9 @@
<P>
<PRE> [- Execute ('x.html') -]
</PRE>
+<P>
+<HR>
+<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="EmbPerl_iteration_without_indexi">EmbPerl iteration without indexing</A></H2>
<P>
I have a rather large table in a database which I'd like to display using
EmbPerl. All of the examples show a process of fetching all the data first,
1.7 +1 -0 modperl-site/embperl/Faq.pod.cont.html
Index: Faq.pod.cont.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Faq.pod.cont.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Faq.pod.cont.html 1999/05/10 20:37:11 1.6
+++ Faq.pod.cont.html 1999/07/06 12:31:21 1.7
@@ -81,6 +81,7 @@
<LI><A href="Faq.pod.3.html#Why_are_Perl_blocks_broken_up_in">Why are Perl blocks broken up into single subroutines?</A>
<LI><A href="Faq.pod.3.html#Can_I_pass_QUERY_STRING_informat">Can I pass QUERY_STRING information to an HTML::Embperl::Execute call?</A>
<LI><A href="Faq.pod.3.html#How_to_include_other_files_into_">How to include other files into Embperl pages?</A>
+ <LI><A href="Faq.pod.3.html#EmbPerl_iteration_without_indexi">EmbPerl iteration without indexing</A>
<LI><A href="Faq.pod.3.html#How_to_display_arrays_with_undef">How to display arrays with undef values in it?</A>
</UL>
1.7 +2 -2 modperl-site/embperl/Intro.pod.5.html
Index: Intro.pod.5.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Intro.pod.5.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Intro.pod.5.html 1999/05/10 20:37:14 1.6
+++ Intro.pod.5.html 1999/07/06 12:31:22 1.7
@@ -16,7 +16,7 @@
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
-[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.4.html">PREV (Form fields)</a>] [<a href="Intro.pod.6.html">NEXT (Breaking up your code in components)</a>] <br><hr>
+[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.4.html">PREV (Form fields)</a>] [<a href="Intro.pod.6.html">NEXT (Breaking your code up into components)</a>] <br><hr>
<P>
<PRE> (Embperl 1.2 or above)
</PRE>
@@ -42,7 +42,7 @@
first requested. You don't need to worry about performance - as long as you
don't touch <CODE>%udat</CODE> or %mdat, no action is taken.
-<p>[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.4.html">PREV (Form fields)</a>] [<a href="Intro.pod.6.html">NEXT (Breaking up your code in components)</a>] <br>
+<p>[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.4.html">PREV (Form fields)</a>] [<a href="Intro.pod.6.html">NEXT (Breaking your code up into components)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
1.7 +72 -16 modperl-site/embperl/Intro.pod.6.html
Index: Intro.pod.6.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Intro.pod.6.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Intro.pod.6.html 1999/05/10 20:37:15 1.6
+++ Intro.pod.6.html 1999/07/06 12:31:22 1.7
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
-<TITLE>Breaking up your code in components</TITLE>
+<TITLE>Breaking your code up into components</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
</HEAD>
@@ -8,7 +8,7 @@
<blockquote>
<blockquote>
<H1><strong>
-<A NAME="Breaking_up_your_code_in_compone">Breaking up your code in components</a></strong></h1>
+<A NAME="Breaking_your_code_up_into_compo">Breaking your code up into components</a></strong></h1>
</blockquote>
</blockquote>
@@ -16,18 +16,52 @@
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
-[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.5.html">PREV (Maintaining persistent (session) data)</a>] [<a href="Intro.pod.7.html">NEXT (Debugging)</a>] <br><hr>
+[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.5.html">PREV (Maintaining persistent (session) data)</a>] [<a href="Intro.pod.7.html">NEXT (Debugging)</a>] <br> <UL>
+
+ <LI><A href="Intro.pod.6.html#Subroutines">Subroutines</A>
+ <LI><A href="Intro.pod.6.html#Execute">Execute</A>
+ <LI><A href="Intro.pod.6.html#Creating_Component_Libraries">Creating Component Libraries</A>
+ </UL>
+<hr>
<P>
<PRE> (Embperl 1.2 or above)
</PRE>
+<P>
+<HR>
+<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="Subroutines">Subroutines</A></H2>
+<P>
+It is better to write subroutines than to keep placing repetetive pieces of
+code in your program many times. You can do this with Embperl too. As an
+example, if you have text input fields with labels, this may work better
+for you:
+
+<P>
+[$ sub textinput $] [- ($label, $name) = @param -] [+ <CODE>$label</CODE> +]<input type=text name=[+
+<CODE>$name</CODE> +]> [$ endsub $]
+
+<P>
+<form> [- textinput ('Last Name', 'lname') -]<p> [- textinput
+('First Name', 'fname') -]<p> </form>
+
+<P>
+The <STRONG>sub</STRONG> metacommand starts the subroutine and the parameters are passed in the
+array <STRONG>@param</STRONG>. You can do anything in the subroutine that you would normally be able to
+do inside normal Embperl pages. Embperl lets you call this subroutine just
+like any other Perl subroutine: just write its name and, if necessary, the
+parameter list.
+
+<P>
+<HR>
+<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="Execute">Execute</A></H2>
<P>
-If you are working on a complete site, and not just a few pages, there are
-always elements which occur in every page or in many pages. Instead of
-copying the source code to every page, you can include <STRONG>Embperl modules</STRONG>
-in your pages, so you have to write the source only once. Such a module
-could be a header, a footer, a navigation bar etc. Embperl is not only
-caple of including such partial pages, you can also pass arguments - for
-example, to tell the navigation bar which element to highlight.
+If you are working on an entire site rather than just a few pages, you are
+well aware that there are always elements which occur in every page or
+across many pages. Instead of copying the source code to every page, you
+can include other Embperl pages in your page - so you have to write the
+source only once. Such an included page could be a header, a footer, a
+navigation bar, and so on. Embperl is not only capable of including such
+partial pages, you can also pass arguments - for example, to tell the
+navigation bar which of its own element to highlight:
<P>
<PRE> Example for a simple navigation bar
@@ -42,8 +76,8 @@
<hr>
</PRE>
<P>
-Now if you are on the ``Info'' page you can include the navigation bar as
-following:
+Now if you are on the ``Info'' page you can include the navigation bar this
+way:
<P>
<PRE> [- Execute ('navbar.html', 'Infos') -]
@@ -51,12 +85,34 @@
<P>
This will include the navigation bar, which is stored in the file
navbar.html, and pass as its first parameter the string 'Infos'. The
-navigation bar module itself uses a dynamic table to display one column,
-which contains the text and a link, for every item in the array @buttons.
-Also the text which is equal to the one passed as first parameter is
+navigation bar module itself uses a dynamic table to display one column -
+which contains the text and a link - for every item in the array @buttons.
+The text which matches that which is passed as the first parameter is
displayed in bold. There is also a long form of the Execute call, which
-allows you to control all details how the called module is executed.
+allows you to control all of the details of how the called page is
+executed.
+
+<P>
+<HR>
+<H2><img src="sq.gif" width="16" height="16" alt="-"> <A NAME="Creating_Component_Libraries">Creating Component Libraries</A></H2>
+<P>
+Instead of creating a single file for every piece of HTML-code you wish to
+include, you can pack them together in just one library. To do this, split
+up every piece of code you want to include separately in one Embperl
+subroutine (sub-metacommand). Now, you can use the import parameter of the
+Execute function to import all of the subrountines defined in one file,
+into the namespace of the current page. Afterwards, you are able to call
+them just like any other Perl subroutine.
+<P>
+Moreover, if you wish to have some systemwide Embperl subroutines, you can
+put all the Embperl code in a normal Perl module (a foo.pm file), install
+it into your Perl system (or a private library path), and use it just like
+any other Perl module - just by saying
+
+<P>
+<PRE> use mymodule;
+</PRE>
<p>[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.5.html">PREV (Maintaining persistent (session) data)</a>] [<a href="Intro.pod.7.html">NEXT (Debugging)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
1.7 +2 -2 modperl-site/embperl/Intro.pod.7.html
Index: Intro.pod.7.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Intro.pod.7.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Intro.pod.7.html 1999/05/10 20:37:15 1.6
+++ Intro.pod.7.html 1999/07/06 12:31:22 1.7
@@ -16,7 +16,7 @@
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
-[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.6.html">PREV (Breaking up your code in components)</a>] [<a href="Intro.pod.8.html">NEXT (Database access)</a>] <br> <UL>
+[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.6.html">PREV (Breaking your code up into components)</a>] [<a href="Intro.pod.8.html">NEXT (Database access)</a>] <br> <UL>
<LI><A href="Intro.pod.7.html#Embperl_log_file">Embperl log file</A>
<LI><A href="Intro.pod.7.html#Embperl_log_file_can_be_viewed_v">Embperl log file can be viewed via the browser</A>
@@ -56,7 +56,7 @@
error page is a link to the corresponding position in the logfile, so you
can easily find the place where something is going wrong.
-<p>[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.6.html">PREV (Breaking up your code in components)</a>] [<a href="Intro.pod.8.html">NEXT (Database access)</a>] <br>
+<p>[<a href="index.html">HOME</a>] [<a href="Intro.pod.cont.html">CONTENT</a>] [<a href="Intro.pod.6.html">PREV (Breaking your code up into components)</a>] [<a href="Intro.pod.8.html">NEXT (Database access)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
1.7 +8 -1 modperl-site/embperl/Intro.pod.cont.html
Index: Intro.pod.cont.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/Intro.pod.cont.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Intro.pod.cont.html 1999/05/10 20:37:16 1.6
+++ Intro.pod.cont.html 1999/07/06 12:31:22 1.7
@@ -64,7 +64,14 @@
</UL>
<LI><A href="Intro.pod.5.html#Maintaining_persistent_session_">Maintaining persistent (session) data</A>
- <LI><A href="Intro.pod.6.html#Breaking_up_your_code_in_compone">Breaking up your code in components</A>
+ <LI><A href="Intro.pod.6.html#Breaking_your_code_up_into_compo">Breaking your code up into components</A>
+ <UL>
+
+ <LI><A href="Intro.pod.6.html#Subroutines">Subroutines</A>
+ <LI><A href="Intro.pod.6.html#Execute">Execute</A>
+ <LI><A href="Intro.pod.6.html#Creating_Component_Libraries">Creating Component Libraries</A>
+ </UL>
+
<LI><A href="Intro.pod.7.html#Debugging">Debugging</A>
<UL>
1.13 +20 -6 modperl-site/embperl/index.html
Index: index.html
===================================================================
RCS file: /export/home/cvs/modperl-site/embperl/index.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- index.html 1999/06/16 18:44:51 1.12
+++ index.html 1999/07/06 12:31:22 1.13
@@ -23,6 +23,9 @@
<tr>
<td valign="top"><table border="0" width="100%">
<tr>
+ <td bgcolor="#FF8000"><big> <a href="Features.pod.1.html">Features</a> </big></td>
+ </tr>
+ <tr>
<td bgcolor="#FF8000"><big> <a href="Intro.pod.cont.html">Introduction</a> </big></td>
</tr>
<tr>
@@ -65,7 +68,7 @@
<td bgcolor="#00ff20"> <a href="Embperl.pod.15.html"><code>Stable: 1.1.1</code></a></td>
</tr>
<tr>
- <td bgcolor="#00ff40"> <a href="Embperl.pod.15.html"><code>Beta: 1.2b4</code></a></td>
+ <td bgcolor="#00ff40"> <a href="Embperl.pod.15.html"><code>Beta: 1.2b5</code></a></td>
</tr>
<tr>
<td bgcolor="#00ff60"><big> </big></td>
@@ -98,16 +101,27 @@
Embperl is a server-side tool, which means it's browser-indpendent. It can run in various
ways: Under mod_perl, as a cgi script, or offline. <p>
- If you would like to get an impression of Embperl,
- read the <a href="Intro.pod.cont.html">introduction</a>.
-If you would like to know more about Embperl,
+ If you would like to get an impression of Embperl's features,
+ you can see them <a href="Features.pod.1.html">here</a>.
+ Read the <a href="Intro.pod.cont.html">introduction</a> to get started.
+ If you would like to know more about Embperl,
here is the <a href="Embperl.pod.cont.html">full documentation</a>.
A <a href="Faq.pod.cont.html">FAQ list</a> is also available and the history of
<a href="Changes.pod.cont.html">Changes</a> can also be found here. There are also useful
<a href="Examples.html">examples</a> which show exactly how Embperl works.<p>
There is also a module for Database access within Embperl, look here for an introduction of
- <a href="Intro.pod.8.html#DBIx_Recordset">DBIx::Recordset</a> </td>
- </tr>
+ <a href="Intro.pod.8.html#DBIx_Recordset">DBIx::Recordset</a> <p>
+ <table><tr><td><a href="http://conferences.oreilly.com/"><img src="conf.gif"></a></td><td>
+ On the <a href="http://conferences.oreilly.com/">O'Reilly Open Source Software Convention</a>
+ there are two talks about Embperl<p>
+ <a href="http://conferences.oreilly.com/apache/conf_desc.html#c13">Embperl and DBIx::Recordset
+ -- How to Easily Build a Database Driven Web Site</a><p>
+ <a href="http://conferences.oreilly.com/perl3/conf_desc.html#p21">New Stuff: Embedding Perl
+ </a> </td></tr></table>
+
+
+ </td>
+ </tr>
</table>
</td>
</tr>
1.1 modperl-site/embperl/Features.pod.1.html
Index: Features.pod.1.html
===================================================================
<HTML>
<HEAD>
<TITLE>Main features of HTML::Embperl 1.2</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
</HEAD>
<BODY bgcolor="#FFFFFF">
<blockquote>
<blockquote>
<H1><strong>
<A NAME="Main_features_of_HTML_Embperl_1">Main features of HTML::Embperl 1.2</a></strong></h1>
</blockquote>
</blockquote>
<img src="line.jpg" align="left" alt="________" WIDTH="732" HEIGHT="35">
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
[<a href="index.html">HOME</a>] [<a href="Features.pod.cont.html">CONTENT</a>] [<a href="Features.pod.cont.html">PREV (Features - Content)</a>] <br><hr>
<UL>
<LI>
<P>
Lets you embed Perl code into HTML documents. Perl code is evaluated at the
server side and the result is sent to the browser.
<LI>
<P>
Offers various meta-commands for conditional and loop processing of the
HTML documents.
<LI>
<P>
Automatically generates dynamic HTML tables/lists from Perl arrays or
function calls (e.g. DBI fetch)
<LI>
<P>
Form data send to your document is placed in a hash
<LI>
<P>
Automatically inserts data from the form hash into HTML input, textarea and
select tags
<LI>
<P>
Understands HTML and URL escaping and unescaping
<LI>
<P>
Handles per-user and per-module persistent session data for you. All you
need to do is store and retrieve them to and from a special hash.
<LI>
<P>
Allows you to build your web-site out of components. Frequently used
elements can be defined once and included in every page.
<LI>
<P>
Gives you the possibility to build libraries with a set of frequently used
Elements or components, and make them available to the whole web-site in
the same way as Perl modules are - well, modularized.
<LI>
<P>
Supports debugging of pages by generating a very detailed log file and
making it accessible via the browser with a single click.
<LI>
<P>
Generates verbose error pages in which every error can link to the log
file. This is ideal for debugging.
<LI>
<P>
Offers a lot of options for maximum configurability according to your
personal tastes and needs.
<LI>
<P>
Fully integrated into Apache and mod_perl to acheive the best performance.
Can also run as a CGI-script, offline or called from another Perl program.
<LI>
<P>
The Perl module DBIx::Recordset offers high level, easy to handle database
access for Embperl.
<LI>
<P>
If you are concerned about security you can configure Embperl to use
Safe.pm. This way, your documents can run in a safe namespace which can
allow or disallow certain Perl opcodes.
</UL>
<p>[<a href="index.html">HOME</a>] [<a href="Features.pod.cont.html">CONTENT</a>] [<a href="Features.pod.cont.html">PREV (Features - Content)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
</blockquote>
</blockquote>
</td></tr></table></body>
</html>
</BODY>
</HTML>
1.1 modperl-site/embperl/Features.pod.cont.html
Index: Features.pod.cont.html
===================================================================
<HTML>
<HEAD>
<TITLE>Features - Content</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
</HEAD>
<BODY bgcolor="#FFFFFF">
<blockquote>
<blockquote>
<H1><strong>
<A NAME="Content-Features.pod.cont">Features - Content</a></strong></h1>
</blockquote>
</blockquote>
<img src="line.jpg" align="left" alt="________" WIDTH="732" HEIGHT="35">
<BR CLEAR=LEFT>
<blockquote>
<blockquote>
[<a href="index.html">HOME</a>] [<a href="Features.pod.cont.html">CONTENT</a>] [<a href="Features.pod.1.html">NEXT (Main features of HTML::Embperl 1.2)</a>] <br><HTML>
<HEAD>
<TITLE>Features - Content</TITLE>
<LINK REV="made" HREF="mailto:root@venus.gr.ecos.de">
</HEAD>
<BODY>
<!-- INDEX BEGIN -->
<UL>
<LI><A href="Features.pod.1.html#Main_features_of_HTML_Embperl_1">Main features of HTML::Embperl 1.2</A>
</UL>
<!-- INDEX END -->
<hr><p>[<a href="index.html">HOME</a>] [<a href="Features.pod.cont.html">CONTENT</a>] [<a href="Features.pod.1.html">NEXT (Main features of HTML::Embperl 1.2)</a>] <br>
<font color="#808080">___________________________________________________________________________________<br>
HTML::Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
</font></p>
</blockquote>
</blockquote>
</td></tr></table></body>
</html>
</body></html>
1.1 modperl-site/embperl/conf.gif
<<Binary file>>