You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2004/01/22 22:55:12 UTC
cvs commit: embperl/test/html epglobals.htm
richter 2004/01/22 13:55:12
Modified: . Changes.pod Embperl.pm Embperl.pod EmbperlD.pod
MANIFEST TODO epdat2.h epinit.c test.pl
Embperl Util.pm
Added: test/cmp epglobals.htm
test/html epglobals.htm
Log:
added $epreq and $epapp, documented exit
Revision Changes Path
1.219 +3 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -r1.218 -r1.219
--- Changes.pod 22 Jan 2004 19:51:12 -0000 1.218
+++ Changes.pod 22 Jan 2004 21:55:12 -0000 1.219
@@ -6,6 +6,8 @@
- Added -break parameter for haveing precondition to
Embperl::Form::Validate
+ - Added $epreq and $epapp for the request and application object, so
+ $r = shift isn't needed anymore on every page.
- fixed various compiler warnings reported by Angus Lees.
- Added missing Form/Validate modules to distribution.
- fixed missing $req_rec in base template call from Embperl::Object.
@@ -17,6 +19,7 @@
- Fixed tests for Perl 5.8.2
- Fixed a bug with print OUT at the end of a nested tag inside a loop reported
by Neil Gunton
+ - Documented exit with argument behaviour.
=head1 2.0b9 10. Juni 2003
1.184 +2 -1 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- Embperl.pm 16 Jan 2004 08:24:26 -0000 1.183
+++ Embperl.pm 22 Jan 2004 21:55:12 -0000 1.184
@@ -41,6 +41,7 @@
$modperl
$modperl2
$req
+ $app
) ;
1.83 +14 -1 embperl/Embperl.pod
Index: Embperl.pod
===================================================================
RCS file: /home/cvs/embperl/Embperl.pod,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- Embperl.pod 10 Jun 2003 03:16:11 -0000 1.82
+++ Embperl.pod 22 Jan 2004 21:55:12 -0000 1.83
@@ -601,6 +601,17 @@
Contains the environment as seen from a CGI script.
+=head2 $epreq
+
+Contains a reference to the Embperl request object. This is the same
+as adding C<$epreq = shift> at the top of each page.
+
+=head2 $epapp
+
+Contains a reference to the Embperl application object. This is the same
+as C<$epreq -> app> would return.
+
+
=head2 %fdat
Contains all the form data sent to the script by the calling form.
@@ -1203,7 +1214,9 @@
B<NOTE 1:> If you are inside of an Execute, Embperl will only exit this Execute, but
the file which called the file containing the exit with Execute will continue.
-B<NOTE 2:> If you write a module which should work with Embperl under mod_perl,
+B<NOTE 2:> If you called exit with an argument it exits the whole request.
+
+B<NOTE 3:> If you write a module which should work with Embperl under mod_perl,
you must use Apache::exit instead of the normal Perl exit (as always
when running under mod_perl).
1.55 +14 -1 embperl/EmbperlD.pod
Index: EmbperlD.pod
===================================================================
RCS file: /home/cvs/embperl/EmbperlD.pod,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- EmbperlD.pod 10 Jun 2003 03:16:11 -0000 1.54
+++ EmbperlD.pod 22 Jan 2004 21:55:12 -0000 1.55
@@ -587,6 +587,16 @@
Enth�lt die selben Umgebungsvariablen, wie bei einem CGI Skript.
+=head2 $epreq
+
+Enth�lt eine Referenz auf das Embperl Request Object. Dies ist dasselbe
+wie wenn man C<$epreq = shift> am Seitenanfang schreibt.
+
+=head2 $epapp
+
+Enth�lt eine Referenz auf das Embperl Application Object. Dies ist dasselbe
+wie C<$epreq -> app> zur�ckliefert.
+
=head2 %fdat
Enth�lt alle Formulardaten, die an das Dokument gesendet wurden.
@@ -1203,7 +1213,10 @@
B<Hinweis 1:> exit beendet nur die aktuelle Datei. Wurde die Datei von
einer anderen mittels Execute aufgerufen, wird die aufrufende Datei fortgesetzt.
-B<Hinweis 2:> Innerhalb eines Perlmoduls, das von einer I<Embperl> Seite
+B<Hinweis 2:> Wird exit mit einem Argument aufgerufen, beendet es den
+gesamten Request, nicht nur die Ausf�hrung der aktuellen Datei.
+
+B<Hinweis 3:> Innerhalb eines Perlmoduls, das von einer I<Embperl> Seite
aus aufgerufenen wird, sollten sie C<Apache::exit> verwenden, da das normale
Perl C<exit> ansonsten den kompletten Childproze� beendet. C<Apache::exit>
f�hrt dazu, dass die Ausf�hrung des Moduls, wie auch der I<Embperl> Seite,
1.85 +2 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- MANIFEST 22 Jan 2004 20:40:14 -0000 1.84
+++ MANIFEST 22 Jan 2004 21:55:12 -0000 1.85
@@ -217,6 +217,7 @@
test/cmp/div.asc
test/cmp/div.htm
test/cmp/epform.htm
+test/cmp/epglobals.htm
test/cmp/epobase.htm
test/cmp/epobaselib.htm
test/cmp/epobless.htm
@@ -417,6 +418,7 @@
test/html/discard.htm
test/html/div.htm
test/html/epform.htm
+test/html/epglobals.htm
test/html/errdoc/epl/errdoc2.htm
test/html/errdoc/errdoc.htm
test/html/errmsg.htm
1.115 +0 -1 embperl/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/embperl/TODO,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- TODO 22 Jan 2004 19:51:12 -0000 1.114
+++ TODO 22 Jan 2004 21:55:12 -0000 1.115
@@ -7,7 +7,6 @@
- debug defualt to zero?
-- make $Embperl::req global
TODO for Embperl 2.1 and later
1.5 +2 -1 embperl/epdat2.h
Index: epdat2.h
===================================================================
RCS file: /home/cvs/embperl/epdat2.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- epdat2.h 2 Jan 2003 07:39:44 -0000 1.4
+++ epdat2.h 22 Jan 2004 21:55:12 -0000 1.5
@@ -207,6 +207,7 @@
GV * pFormArrayGV ;
HV * pHeaderHash ;/* http headers */
SV * pReqRV ; /* the request object global */
+ SV * pAppRV ; /* the application object global */
AV * pParamArray ;
GV * pParamArrayGV ;
1.12 +5 -1 embperl/epinit.c
Index: epinit.c
===================================================================
RCS file: /home/cvs/embperl/epinit.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- epinit.c 16 Jan 2004 08:24:26 -0000 1.11
+++ epinit.c 22 Jan 2004 21:55:12 -0000 1.12
@@ -53,6 +53,7 @@
#define PARAM_NAME "param"
#define EMBPERL_PARAM_NAME EMBPERL_PACKAGE_STR"::"PARAM_NAME
#define EMBPERL_REQ_NAME EMBPERL_PACKAGE_STR"::req"
+#define EMBPERL_APP_NAME EMBPERL_PACKAGE_STR"::app"
#define EMBPERL_ENV_NAME "ENV"
#define EMBPERL_EscMode_NAME EMBPERL_PACKAGE_STR"::escmode"
@@ -252,6 +253,7 @@
pThread -> pParamArray = perl_get_av (EMBPERL_PARAM_NAME, TRUE) ;
pThread -> pParamArrayGV = *((GV **)hv_fetch (pStash, PARAM_NAME, sizeof (PARAM_NAME) - 1, 0)) ;
pThread -> pReqRV = perl_get_sv (EMBPERL_REQ_NAME, TRUE) ;
+ pThread -> pAppRV = perl_get_sv (EMBPERL_APP_NAME, TRUE) ;
/* avoid warnings */
perl_get_hv (EMBPERL_FDAT_NAME, TRUE) ;
perl_get_hv (EMBPERL_SPLIFDAT_NAME, TRUE) ;
@@ -663,6 +665,8 @@
embperl_SetupSessionObjects (pApp) ;
}
+ sv_setsv(pThread -> pAppRV, pApp -> _perlsv) ;
+
*ppApp = pApp ;
return ok ;
1.132 +2 -1 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- test.pl 22 Jan 2004 20:40:14 -0000 1.131
+++ test.pl 22 Jan 2004 21:55:12 -0000 1.132
@@ -242,6 +242,7 @@
'version' => 2,
},
'heredoc.htm' => { },
+ 'epglobals.htm' => {},
'post.htm' => {
'offline' => 0,
'reqbody' => "f1=abc1&f2=1234567890&f3=" . 'X' x 8192,
1.3 +3 -1 embperl/Embperl/Util.pm
Index: Util.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Util.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Util.pm 22 Oct 2002 05:39:48 -0000 1.2
+++ Util.pm 22 Jan 2004 21:55:12 -0000 1.3
@@ -90,6 +90,8 @@
*{"$package\:\:$_"} = \${"Embperl\:\:$_"} ;
$dummy = ${"$package\:\:$_"} ; # necessary to make sure variable exists!
}
+ *{"$package\:\:epreq"} = \$Embperl::req ;
+ *{"$package\:\:epapp"} = \$Embperl::app ;
foreach (@AliasHash)
{
1.1 embperl/test/cmp/epglobals.htm
Index: epglobals.htm
===================================================================
epreq: Embperl::Req
epapp: Embperl::App
^epreq -> app Embperl::App=HASH\(0x[0-9a-f]+\) epapp Embperl::App=HASH\(0x[0-9a-f]+\) eq yes
appname Embperl
1.1 embperl/test/html/epglobals.htm
Index: epglobals.htm
===================================================================
epreq: [+ ref $epreq +]
epapp: [+ ref $epapp +]
epreq -> app [+ $epreq -> app +] epapp [+ $epapp +]
eq [+ $epreq -> app eq $epapp?'yes':'no' +]
appname [+ $epapp -> config -> app_name +]
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org