You are viewing a plain text version of this content. The canonical link for it is here.
Posted to announce@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2000/07/17 07:13:06 UTC

ANNOUNCE: HTML::Embperl 1.3b4

The URL

    ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-1.3b4.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3b4.tar.gz
  size: 278004 bytes
   md5: 9fa246a00ad7087ef952b6e84901d076


Embperl is a module for embedding Perl code in HTML pages. See
http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more informations.

The main news in this release are the enhanced features of EmbperlObject,
which now allows sub's to be called as methods, were methods in the
requested page overwrite methods in the base template. Additionaly it's
possible to use the Embperl request object to store per request data and
pass them between different parts of a page.

Still missing is the support for Apache::Session 1.50 and higher, but this
is coming soon after the Perl conference.

Enjoy
Gerald

Changes since 1.3b3:

   - New $escmode (or EMBPERL_ESCMODE) to disable the possiblilty
     to turn off escaping with a leading backslash. Adding 4 to
     any escmode will cause Embperl to do no special processing
     on the backslash. This is mainly to avoid problems with
     cross site scripting issuse, where people are able to enter
     aribtary HTML. Spotted by Dirk Lutzebaeck.
   - Characters between 128 and 159 are all HTML escaped now to
     avoid problems with buggy browser, which were reported to
     treat the chars 139 and 141 as < and >.  Spotted by Dirk Lutzebaeck.
   - If a requested file is not found when using EmbperlObject as handler,
     the file given by C<EMBPERL_OBJECT_FALLBACK> is displayed instead.
     If C<EMBPERL_OBJECT_FALLBACK> isn't set a staus 404, NOT_FOUND is
     returned as usual.
   - "perl Makefile.PL debug" will build debugging information for
     gdb/ms-vc++ into Embperl library.
   - test.pl can take a bunch of new options for debugging Embperl itself.
     See make test TESTARGS="--help".
   - Embperl 1.x and 2.x share now the same Makefile.PL and test.pl
   - Added new debug flag dbgObjectSerach which logs the EmbperlObjects
     work when searching the correct file.
   - If import parameter is given to Execute, Perl code is compiled, but
     only [!  !] blocks are executed (to allow sub definitions on import)
   - Space is converted to %20 instead of +, because that is more generic.
     Suggested by Michael Blakely.
   - EmbperlObject now automaticly defines all subs that are declared
     inside the base template and inside the requested page, so it isn't
     neccessary anymore to call Execute with import => 0 for them.
   - Every Embperl Page now get passed a request object (which can be
obtained
     from $_[0]). The request object is a hash reference which is blessed
     into the package HTML::Embperl::Req. Embperl itself don't uses the
hash, so
     you are free to populate it and pass data between different pages of
one request.
   - EmbperlObject now setup the inherence so that
       request page -ISA->
       base template -ISA->
       EMBPERL_OBJECT_HANDLER_CLASS (if defined) -ISA->
       HTML::Embperl::Req
     and the Embperl request object is blessed into the packages of the
     requested page, so you can do methods calls to subs that are defined
     inside the requested page.
   - correct spelling error and renamed ScanEnvironement to ScanEnvironment.
     (ScanEnvironement still works).
   - EmbperlObject can now be used also offline (via
HTML::EmbperlObject::Execute)
   - MailFormTo and HTML::Embperl::Mail::Execute now have a configuration
     directive EMBPERL_MAILHELO, can be used to specify the host/domain for
the
     HELO/EHLO command. Suggested by Remco Brink.
   - Fixed a bug that caused the default drive to be incorrectly set on Win
32.


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


RE: ANNOUNCE: HTML::Embperl 1.3b4

Posted by Gerald Richter <ri...@ecos.de>.
> 
> Moreover, Mail.pm line 69 seems to have more ')' then necessary.
> 

sh....

Yes, there is one ( missing at the start of line 68.

Gerald


Re: ANNOUNCE: HTML::Embperl 1.3b4

Posted by Robert <ro...@robert.cz>.
Moreover, Mail.pm line 69 seems to have more ')' then necessary.

- Robert

RE: ANNOUNCE: HTML::Embperl 1.3b4

Posted by Gerald Richter <ri...@ecos.de>.
> 
> Just tried it and there's something quite wrong, it says
> 
> [Mon Jul 17 17:28:02 2000] [error] Undefined subroutine
> &HTML::EmbperlObject::handler called.
>  
> Bareword "HTML::Embperl::optDisableVarCleanup" not allowed while "strict
> subs" in use at
> /usr/lib/perl5/site_perl/5.005/i386-linux/HTML/EmbperlObject.pm line
> 123.
...

> 
> .htaccess
> ------------------------------------------
> PerlSetEnv	EMBPERL_OPTIONS 8208
> PerlSetEnv	EMBPERL_ESCMODE 0
> PerlSetEnv	EMBPERL_DEBUG 1
> <FilesMatch ".*\.html$">
> 	PerlSetEnv 	EMBPERL_FILESMATCH "\.html$"
> 	PerlSetEnv 	EMBPERL_OBJECT_BASE base.html
> 	SetHandler	perl-script
> 	PerlHandler 	HTML::EmbperlObject
> 	Options		ExecCGI
> </FilesMatch>
> 

Does it change anything when you add a

PerlModule HTML::EmbperlObject

to your httpd.conf (not .htaccess)

Gerald



Re: ANNOUNCE: HTML::Embperl 1.3b4

Posted by Robert <ro...@robert.cz>.
Just tried it and there's something quite wrong, it says

[Mon Jul 17 17:28:02 2000] [error] Undefined subroutine
&HTML::EmbperlObject::handler called.
 
Bareword "HTML::Embperl::optDisableVarCleanup" not allowed while "strict
subs" in use at
/usr/lib/perl5/site_perl/5.005/i386-linux/HTML/EmbperlObject.pm line
123.
Bareword "HTML::Embperl::optSendHttpHeader" not allowed while "strict
subs" in use at
/usr/lib/perl5/site_perl/5.005/i386-linux/HTML/EmbperlObject.pm line
124.
Bareword "HTML::Embperl::dbgObjectSearch" not allowed while "strict
subs" in use at
/usr/lib/perl5/site_perl/5.005/i386-linux/HTML/EmbperlObject.pm line
163.
[Mon Jul 17 17:28:11 2000] [error] BEGIN not safe after
errors--compilation aborted at
/usr/lib/perl5/site_perl/5.005/i386-linux/HTML/EmbperlObject.pm line
250.
 
Exactly the same files work with 1.3b3 - what's wrong? Make test is OK
for both betas.

- Robert



P.S. Here are the files:


.htaccess
------------------------------------------
PerlSetEnv	EMBPERL_OPTIONS 8208
PerlSetEnv	EMBPERL_ESCMODE 0
PerlSetEnv	EMBPERL_DEBUG 1
<FilesMatch ".*\.html$">
	PerlSetEnv 	EMBPERL_FILESMATCH "\.html$"
	PerlSetEnv 	EMBPERL_OBJECT_BASE base.html
	SetHandler	perl-script
	PerlHandler 	HTML::EmbperlObject
	Options		ExecCGI
</FilesMatch>


base.html
------------------------------------------
<html>
<head>
	<title>Example</title>
</head>
<body>
	<h1>Example</h1>
	[- Execute ('*') -]
</body>
</html>


index.html
------------------------------------------
<p>Toto je <b>index.html</b></p>
<br>