Re: HTML-Embperl : Read file problem

2003-07-30 Thread Stas Bekman
Radovan Petrík wrote:
Hi, 

sorry for my begginer question , i have this code in HTML-Embperl 
http://perl.apache.org/embperl/pod/doc/Embperl.-page-12-.htm

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


HTML-Embperl : Read file problem

2003-07-30 Thread Radovan Petrík
Hi, 

sorry for my begginer question , i have this code in HTML-Embperl 

1  open (F , 'my_file') or die ;
2  @lines = ;

On line 2 embperl return error "syntax error" . Why ? 

And when I need open new file " open (F , '> my_file') or die "  then 
embperl dont open new file.

Thanks 

Rado.




ANNOUNCE: Embperl 2.0b9

2003-06-09 Thread Gerald Richter
The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-2.0b9.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Embperl-2.0b9.tar.gz
  size: 654860 bytes
   md5: 3a4836d15100feb2bf9c37e9470a1d1d


While development has continued all the time, there was a long time no
release of Embperl, so it's really overdue.

This version fixes a number of bugs and adds a lot of enhancements. My plan
is to make the next release the final 2.0. So give it a try, so we can catch
as much problems as possible before.

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML/XML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
Websites, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, caching, xslt transformation
and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.


Enjoy

Gerald

Changes since 2.0b8:

   - libxml now searchs through Embperl search path when includeing external
entities,
 so for example  directives searchs files the same way as
Execute
 does under Embperl::Object.
   - fixed typo in JavaScript code for Form::Validate reported by Axel
Beckert
   - fixed typo in Embperl::Mail reported by Axel Beckert.
   - fixed small bugs in Embperl::Form::Validate test code reported by Axel
Beckert.
   - charcters 128-160 are now escaped in URLs to avoid problems with
Mozilla.
   - fixed missing escaping of '/' in Embperl::Form::Validate JS routines.
 Patch from Axel Beckert.
   - fixed spelling: CACKE_KEY -> CACHE_KEY. Reported by Andre Landwehr.
   - URL escaping now fully conforms to RFC 2396. This mainly solves some
problems
 where IE interpreted characters in URLs as UTF8.
   - Embperl::Form::Validate JavaScript code can now handle fieldnames that
 aren't correct JavaScript identifier.
   - Fix SIGSEGV when printing to Embperl::LOG before Embperl log file is
setup.
   - Fix problem when session id is given to Embperl, but session management
 was not setup
   - Added 'same' validation to check if two fileds have the same input
enterd
   - Fixed memory leak. Patch from Joshua Chamas.
   - Use MP_AP_PREFIX as source for APache 2. Patch from Paul Dyer.
   - Fixed a initialisation bug which caused under special conditions a
segfault
 when compiling a select tag.
   - Fixed compiler warnings and errors when compiling with Perl 5.8.0.
   - Replaced PL_sv_undef with ep_sv_undef (which is a copy of PL_sv_undef),
 because storing PL_sv_undef in a Perl 5.8.0 hash is treated as a
placeholder
 and doesn't work as before.
   - Fixed problem with [$ sub $] when running under Perl 5.8.0.
   - Fixed problem when STDOUT is tied, because storage has changed in Perl
5.8.0.
   - Fixed problem when single quote or backslash is inside of option or
input value.
 Bug reported by Saadiq Rodgers-King.
   - Added [$last$], [$next$], [$redo$] and documented [* next *] etc.
   - Readdeded missing MailFormTo and added test for it.
   - Fixed escaping inside of html attributes of Embperl generated tags like
input
 and [$ hidden $]. Reported by Axel Beckert.
   - checked and selected attributes are now correctly set when values
contains
 entities (e.g. <)
   - Fixed segfault when cleanup is called to early. Reported by Neil
Gunton.
   - If no name is given for a key, Form::Validate now tries to lookup the
correct
 text via Embperl's gettext method.
   - Fixed problem with message ids that are Perl keywords. Reported by
Jaak.
   - Added EMBPERL_COOKIE_SECURE option to transfer cookie only over a
secure
 connection.
   - Added EMBPERL_OUTPUT_MODE that allows to change to XML output, which
cause
 generated tags to contains a closing slash, so they are valid
XML/XHTML.
   - Fixed make test to ignore different idention of newer versions of
 libxslt.
   - Added server_addr to the request param object.
   - Keep spaces and newlines in  tag.
   - Embperl::Mail now encodes all header fields that contains characters
between
 128 and 255. Use headerencoding parameter to turn of or tell Embperl
your charset.
   - Fixed mod_perl 2 detection when mod_perl is build with MP_INST_APACHE2.
   - Fixed problem with reseting $escmode, when using print OUT. Reported by
 David Hull.
   - Fixed compiling problem on FreeBSD.
   - Added function XML::Embperl::DOM::iSetText to change name of Tag.
 Requested by Yatin Chawathe.
   - EMBPERL_COOKIE_EXPIRES now again accepts relatives times like +2h.
   - embpexec.pl now correctly takes config values from environment
 for a

Re: Wanted: Experience with EmbPerl on Win2000/Apache HTTPD?

2003-03-06 Thread Randy Kobes
On Wed, 5 Mar 2003, Richard Heintze wrote:

> Since I had such a tough time installing mod_perl on
> Win2000, I thought I would solicit for experiences
> getting Hello, World running with EmbPerl on Apache
> HTTPD on Windows2000.
> 
> What URL did you download embperl from? 
> Did you get any errors during installation?
> What is the URL you used for installation
> instructions?
> What is the URL you used for the instructions for
> getting HelloWorld to appear?

This might be more appropriate for the embperl mailing
list ... For basic installation, we have an Embperl
ppm package at http://theoryx5.uwinnipeg.ca/ppmpackages/
for ActivePerl 6xx builds (and mod_perl-1/Apache-1).
There's still a bit of work needed to get Embperl ported
to ActivePerl 8xx and/or mod_perl-2/Apache-2. For basic
usage, check out http://perl.apache.org/embperl/.

-- 
best regards,
randy kobes



Wanted: Experience with EmbPerl on Win2000/Apache HTTPD?

2003-03-05 Thread Richard Heintze
Since I had such a tough time installing mod_perl on
Win2000, I thought I would solicit for experiences
getting Hello, World running with EmbPerl on Apache
HTTPD on Windows2000.

What URL did you download embperl from? 
Did you get any errors during installation?
What is the URL you used for installation
instructions?
What is the URL you used for the instructions for
getting HelloWorld to appear?

  Thanks,
  Siegfried

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/


Announce: HTML-Embperl 1.3.6

2003-02-15 Thread Gerald Richter
The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.6.tar.gz
  size: 357623 bytes
   md5: b360a0f9ba5d5e35f6426c81dd91933d


This is a maintaince release which fixes some problems with Perl 5.8.0.

Note: No further developing of 1.3.x is done. All new features are added to
Embperl 2.0

Enjoy

Gerald

Changes since 1.3.4:

1.3.6 (RELEASE)   22. Jan 2003

   - Fixed unicode problems in make test with Perl 5.8.0. With
 support from Robert.
   - Fixed warning about missing CLOSE method with Perl 5.8.0
 Reported by Rajesh Kumar Mallah.

1.3.5 (RELEASE)   23. Dec 2002

   - Runs now with Perl 5.8.0. Thanks to Angus Lees who
 backported the 5.8.0 patches from 2.0.
   - Fixed Path search problem. Reported by Gavin Carr.


--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   Besuchen Sie uns auf der CeBIT vom 12. - 19. März 2003
|   Messe Hannover * Halle 11 * Stand D42/18
|   http://www.cebit.de/
|
+-




Re: ANNOUNCE: Embperl 2.0b8

2002-06-25 Thread Per Einar Ellefsen

At 21:30 25.06.2002, Gerald Richter wrote:
>Hi,
>
> >
> > While I am not very familiar with Embperl, I saw some discussion
>concerning
> > PHP that struck me as pretty interesting for Embperl and similar
> > applications: have you considered making (or atleast having an option for)
> > Embperl an output filter for Apache 2/mod_perl 2? I think this would more
> > clearly show its purpouse, just like SSI is now really a filter under
> > Apache 2.0.
> >
>
>Yes, 2.0b8 can be a output filter for Apache 2.0, even more Embperl::Object,
>which allows you to create your site out of objects or components, can now
>not only include other Perl output, but any output that is created by a
>Apache request, you just use the subreq parameter to the Execute function
>(which is used to inlcude other parts), give it an URI and you have that
>part included in your page, regardless if it is a CGI script, output
>generated by PHP or Java or whatever runs inside Apache and of course you
>can postprocess the output that comes from other Apache components.

Ok, great then!

> > If there is already a way to filter output through Embperl, I'm sorry for
> > this useless post :(
> >
>
>Questions are never useless, this one for example gives me the chance to
>show one of the new feature of Embperl 2 :-)

:-) But I'm still sorry for not checking up enough.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: ANNOUNCE: Embperl 2.0b8

2002-06-25 Thread Gerald Richter

Hi,

>
> While I am not very familiar with Embperl, I saw some discussion
concerning
> PHP that struck me as pretty interesting for Embperl and similar
> applications: have you considered making (or atleast having an option for)
> Embperl an output filter for Apache 2/mod_perl 2? I think this would more
> clearly show its purpouse, just like SSI is now really a filter under
> Apache 2.0.
>

Yes, 2.0b8 can be a output filter for Apache 2.0, even more Embperl::Object,
which allows you to create your site out of objects or components, can now
not only include other Perl output, but any output that is created by a
Apache request, you just use the subreq parameter to the Execute function
(which is used to inlcude other parts), give it an URI and you have that
part included in your page, regardless if it is a CGI script, output
generated by PHP or Java or whatever runs inside Apache and of course you
can postprocess the output that comes from other Apache components.

> If there is already a way to filter output through Embperl, I'm sorry for
> this useless post :(
>

Questions are never useless, this one for example gives me the chance to
show one of the new feature of Embperl 2 :-)

Gerald

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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




Re: ANNOUNCE: Embperl 2.0b8

2002-06-25 Thread Per Einar Ellefsen

At 12:39 25.06.2002, Gerald Richter - ecos gmbh wrote:
>I have done a lot of fine tuning and error fixing since 2.0b7. Also Embperl
>now supports mod_perl 2.0 with prefork MPM (threaded MPM will require Perl
>5.8.0). The docs are moveing towards 2.0, but some features are still only
>documentent in README.v2.
>
>Everybody who is running a copy of Embperl 2, should upgrade to 2.0b8,
>because this will improve stabibility.

Hello Gerald,

While I am not very familiar with Embperl, I saw some discussion concerning 
PHP that struck me as pretty interesting for Embperl and similar 
applications: have you considered making (or atleast having an option for) 
Embperl an output filter for Apache 2/mod_perl 2? I think this would more 
clearly show its purpouse, just like SSI is now really a filter under 
Apache 2.0.

If there is already a way to filter output through Embperl, I'm sorry for 
this useless post :(


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





ANNOUNCE: Embperl 2.0b8

2002-06-25 Thread Gerald Richter - ecos gmbh

The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-2.0b8.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Embperl-2.0b8.tar.gz
  size: 628343 bytes
   md5: d089a86671a0c559b77f107a4e6d67c9


I have done a lot of fine tuning and error fixing since 2.0b7. Also Embperl
now supports mod_perl 2.0 with prefork MPM (threaded MPM will require Perl
5.8.0). The docs are moveing towards 2.0, but some features are still only
documentent in README.v2.

Everybody who is running a copy of Embperl 2, should upgrade to 2.0b8,
because this will improve stabibility.

Enjoy

Gerald

Changes since 2.0b7:

2.0b8  (BETA)  25. Juni 2002

   - exit can now exit the whole request. When called without argument
 it exits the current component, like before, when called with argument
 it exits the whole request.
   - Added support for Apache 2.0 / mod_perl 2.0 (prefork MPM).
   - Added the possibility to catch the output of a sub-request
 (e.g. a CGI script, Java or PHP output) when running under Apache 2.0
   - when setting $r -> param -> filename in an application object
 to a relativ path it is interpreted relativ to original request
   - Start to catch up with new features of Embperl 2 in the docs. Added
 Config.pod for configuration and calling.
   - Lots of improvments in the new Embperl website, which serves as best
 example for using the new Embperl 2 features. It's part of the
distribution
 and can be found under eg/web. See eg/web/README.
   - fixed bug with setting of escmode and print Out reported by
 Eric-Olivier Le Bigot.
   - fixed incorrected escaping inside of an URL when expanding an hash
 or array reference. Reported by Axel Beckert.
   - fixed possible endless loop when expanding hash or array inside of
 an URL.
   - fixed a segfault that occured when source file encryption was enabled.
 Reported by Edwin Ramirez.
   - fixed a segfault that occured when no input file is given. Reported by
 Edwin Ramirez.
   - fixed a segfault that occured on solaris when input comes from memory.
 Reported by Mike Wesemann.
   - readd possibility to build version with and without Apache support
 on windows.
   - Remove Content-Length: 0 HTTP-Header in CGI Mode
   - Fixed segfault when replacing an attribute. Reported by Michael
Stevens.
   - Fixed random segfaults, that had occured when Perl had reallocated it's
 internal Stack.
   - When apache is started with -D EMBPERL_APDEBUG, it outputs a
 configuration trace.
   - When file is not found, Embperl::Object now returns status 404, instead
 of 500. Reported by Cameron McBride.
   - When optReturnError is set, Embperl::Object now really returns the
error code.
 Reported by Cameron McBride.
   - Fixed a reference count error when using the import parameter. Reported
 by Michael Smith.
   - Fixed string reference counting problem in RTF&POD syntax.
   - Fixed a segfault that had occured when a file with a syntax error is
 compiled the second time within the same process. Reported by
 Michael Smith.
   - removed do { } around expressions of [+ +] blocks inside urls, because
 this cost performance and now all [+ +] behaves the same. Reported by
 Michael Smith.
   - make stop now works also on windows.
   - make start, which can be used to view/test the Embperl website localy,
 now displays the URL how to request the site.
   - libxslt does correct error reporting now.
   - libxslt output encoding is now recognized correctly.
   - set Content-Length when sending error page, so Internet Explorer won't
show
 his own error page.


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






Re: ANNOUNCE: Embperl 2.0b7

2002-03-20 Thread Gerald Richter

>
> Any idea when 2.0-STABLE is going to come out?
>

I think the main issuses with the code are solved, so it's stable to use
right now, also I want to give people some more time for testing. The main
work to do before the stable release is to write better documentation. To
transform all the quick notes in README.v2 into real docs.

I can't promise anything, but I hope to get it out during the next few
months.

Gerald


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






ANNOUNCE: Embperl 2.0b7

2002-03-20 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-2.0b7.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Embperl-2.0b7.tar.gz
  size: 620902 bytes
   md5: 89b8dc62aa28684be64fd0d44857d641


Embperl is a system for building dynamic websites with Perl. See
http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more information.

This is mainly a bug fix release. Everybody who is using a 2.0 beta version
of Embperl encouraged to upgrade.

Enjoy Gerald

Changes since 2.0b6:

   - Changed default for EMBPERL_ESCMODE from 3 to 7. This disables
 by default the possibilty use the backslash to not escape a piece
 of output. This increases the security, because it by default
 avoids the interpretation of the backslash in any user input that
 is redisplayed.
   - Fixed bug in mail syntax and Embperl::Mail reported by Jan Kyncl.
   - Removed LogFormat and CustsomLog from test config, so mod_log_config
 is not required for make test. Reported by Jochen Topf.
   - Removed EmbperlObject.pm from MANIFEST, since it was replaced by
 Embperl/Object.pm.
   - Make symbolsnames unique so they don't clash with 1.3.4. Reported
 by Kee Hinckley.
   - Fixed a problem that ocurred when a reference to some of the Embperl
 objects was kept after the end of it's lifetime, which caused a
 segfault.
   - Don't do a path search when the filename starts with './'.
   - Fixed a segfault that occured when many nested sub's are used,
 but only a low number of strings.
   - Fixed a problem that  tags are not correctly selected, when
 the  tag was inside a loop and the name of the 
 tag was dynamicly generated.
   - Added test for config directives inside of VirtualHost


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






ANNOUNCE: Embperl 2.0b6

2002-03-13 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/Embperl-2.0b6.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Embperl-2.0b6.tar.gz
  size: 623200 bytes
   md5: 966e109d700fb76e6df18316c1cf16a1


Embperl is a system for building dynamic websites with Perl. See
http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more information.


I am very happy to announce the 6th beta of Embperl 2.0. It contains a lot
of important improvements since the last beta release:

- Reworked the internal object structure and make it available to Perl
- Introduction of the application object and support for it in
Embperl::Object, which eases the proper seaparation of Code and Layout
- Support for internationalization
- Module for form validation (client- and server-side)
- Moved Embperl from HTML::Embperl to Embperl namespace since it no longer
only serves HTML. This also allows to use 1.3 and 2.0 within the same
server.
- Support for Apache native configuration directives. No need to use
enviroment variables for configuration anymore (but still possible)
- Cleanup of a lot of legency code and move of most of the Perl parts into
C, which makes execution of small files 30%-50% faster
- Better support for XML, Recipes, Providers, Caches etc.

IMPORTANT: The documentation is not up to date yet, all new features are
documented in README.v2, so make sure you read that file first.

This release contains all features that I have planed for 2.0. So I will now
focus and bugfixing and documentation. Please give this beta a try and give
me feedback, so we soon can make a final 2.0 release.

Enjoy Gerald

All Changes since 2.0b5:

   - Embperl have move from the namespace HTML::Embperl to Embperl.
 This is because Embperl is no longer only a HTML framework,
 but is suitable for other formats like XML too. Also this allows
 to install Embperl 1.x and 2.x on the same machine without
 conflicts, to make a smooth upgrade.
   - Rewrote Embperl internal data structures. The Embperl request
 structure is now splitted into thread, application, request
 and component structure.
   - Moved nearly all of the per request/component initialization code
 from Perl to C. Together with the optimized data structures, this
 speeds up request/component initialization, which is especialy a
 performance improvement for pages that  do a lot calls to
 Execute (up to 50% for small includes).
   - All members of these structures now available form Perl
 which avoids using mod_perl Apache object and enviroment
 variables in most cases, makeing the resulting pages more
 independend from the environment they run under. On the other
 side this gives quite a few new possibilities to influence
 what Embperl is doing, especialy together with Embperl::Object.
   - Introduced new application object which holds together a set
 of pages and allows to configure the Embperl logfile and session
 handling different for each application.
   - Added Embperl::Object application object, which is invoked during
 request initialization. Any application code can now go there.
 This allows a proper separation of Code and Design and building of
 MVC (Model, Controller, View), 2-Tier and 3-Tier applications
 with Embperl.
   - Added EMBPERL_APP_HANDLER_CLASS to set the application object
 for Embperl pages, when not using Embperl::Object
   - Embperl now uses nativ Apache configuration directives instead
 of enviroment variables when running under mod_perl. You need to
 load Embperl before you can use any of them, either via
 "PerlModule Embperl" or via "use Embperl" inside of a startup script.
 "Embperl_UseEnv on" is provided to get the old behaviour of using
 environment variables for configuration.
   - The default for input unescaping is now set to off. So people which are
 working with an text editor should be happy, people who are using any
 sort of HTML editor should use EMBPERL_INPUT_ESCMODE to set the way
 Embperl interprets the input.
   - Added new configuration directives EMBPERL_INPUT_ESCMODE which controls
 the unescaping of the input. This superseds the old optRawInput and
 allows a more differentiated control.
   - Added form data validation. Embperl is now capable to do server-side
 and client-side validation of form input. You just have to define
 a set of rules and Embperl generates the correct JavaScript code and
 does the validation when the form data is posted to the server. By
 writing or overriding class, the validatior could be extented.
 See Embperl::Form::Validate for details.
   - Added [= foo =] block and $r -> gettext method for page localization.
 When the page is executed the 'foo' is replaced with a localizied
 message for the current language.
   - Added methods r -> messages and r -> defaul

Re[2]: Mason vs embperl

2001-12-20 Thread C.Hauser - IT assistance GmbH

>> So I installed and compared. I preferred the syntax of Mason, the
>> flexible way to build components, the caching ... it have to be
>> said here that I choose Mason ...
> 
>   I agree, the caching is very good and one gets up and running in no
> time with Mason. However, I find it imposes too much of a coding style
> to the programmer : for example, all pages are evaluated inside the
> same package and thus one cannot define two "normal" subroutines with
> the same name in two different pages.

Use the parser new() parameter 'in_package'

Extract from the mason manual:
"Indicates the name of the package you wish your components to run in.
This way different applications or virtual hosts can be run in different
name spaces. Default is HTML::Mason::Commands."

I simply decided to use subs only in *.pm files as libraries and so
using allays the same name for the same functionality.


Best Regards Christian  -  [EMAIL PROTECTED]  -




Re: Mason vs embperl

2001-12-20 Thread dom

> So I installed and compared. I preferred the syntax of Mason, the
> flexible way to build components, the caching ... it have to be
> said here that I choose Mason ...

  I agree, the caching is very good and one gets up and running in no
time with Mason. However, I find it imposes too much of a coding style
to the programmer : for example, all pages are evaluated inside the
same package and thus one cannot define two "normal" subroutines with
the same name in two different pages.

-- 
<< Tout n'y est pas parfait, mais on y honore certainement les jardiniers >>

Dominique Quatravaux <[EMAIL PROTECTED]>



RE:require -- Mason vs embperl

2001-12-19 Thread Kee Hinckley

At 2:26 PM -0500 12/19/01, Lihn, Horng-Twu wrote:
>Kee,
>This helps. But if I have to do this in very page,
>isn't this post a serious problem to the memory consumption?

I can't speak to "require".  But if you do a "use" in an Embperl 
script, the library will load once per-process.  In fact this 
occasionally causes problems for me, since I'm doing virtual hosting 
and sometimes I have moved one site to a new library, but haven't 
recoded the other--can't do that if the two servers are reusing 
common Apache processes.

That said, it would be nice (just from an easy-of-use point of few) 
if Embperl had an option to load a common library for all of your 
Embperl files on a site--but you could easily do that using 
EmbperlObject.  Just define a template something like this:

[! use MyLibrary; !]
[- Execute('*') -]

Now all of your files have access to MyLibrary.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



Re: require -- Mason vs embperl

2001-12-19 Thread ___cliff rayman___

"Lihn, Horng-Twu" wrote:

> Kee,
> This helps. But if I have to do this in very page,
> isn't this post a serious problem to the memory consumption?
> Or not?

in what way? - u either need the code, or u don't.  if u don't need
all of it, split it into smaller pieces.

>
>
> -Steve
>
> >Maybe I'm missing something, because this seems simple.
> >[- require "foo.pl"; -]
> >will load it everytime the page is loaded
> >[! require "foo.pl"; !]
> >will load it once the first time the page is loaded.
>
> >I use libraries from within Embperl all the time, I don't believe in
> >putting full code definitions in front of the designers.

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





RE:require -- Mason vs embperl

2001-12-19 Thread Lihn, Horng-Twu

Kee,
This helps. But if I have to do this in very page, 
isn't this post a serious problem to the memory consumption?
Or not?

-Steve

>Maybe I'm missing something, because this seems simple.
>[- require "foo.pl"; -]
>will load it everytime the page is loaded
>[! require "foo.pl"; !]
>will load it once the first time the page is loaded.

>I use libraries from within Embperl all the time, I don't believe in 
>putting full code definitions in front of the designers.





Re: Mason vs embperl

2001-12-19 Thread Kee Hinckley

At 8:03 PM +0100 12/18/01, C.Hauser - IT assistance GmbH wrote:
>I use Dreamweaver for the publishers and the <% and <& commands are
>properly displayed as ASP-icons. I use it with Modules Apache::Session,

http://www.somewhere.com/software/ for Dreamweaver extensions to 
display Embperl properly.
I have an overview of things you should think about when looking at 
scripting languages at 
http://commons.somewhere.com/buzz/2000/scripting.html

-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



RE: Mason vs embperl

2001-12-19 Thread Kee Hinckley

At 4:14 PM -0500 12/18/01, Lihn, Horng-Twu wrote:
>I have a library of perl routine that I call in cgi-bin environment
>where I usually "require".  I could not find any way to require it
>and use it in Embperl. I can not find any doc describing how this is done.
>(I can require it in the Mason handler.pl)
>
>Can you shed a light? I think it has something to do with the object model
>which I can not fully comprehend so far.

Maybe I'm missing something, because this seems simple.
[- require "foo.pl"; -]
will load it everytime the page is loaded
[! require "foo.pl"; !]
will load it once the first time the page is loaded.

I use libraries from within Embperl all the time, I don't believe in 
putting full code definitions in front of the designers.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



Re: require in Embperl (was: Mason vs embperl)

2001-12-19 Thread Gerald Richter

> "Lihn, Horng-Twu" <[EMAIL PROTECTED]> writes:
>
> > I have a library of perl routine that I call in cgi-bin environment
> > where I usually "require".  I could not find any way to require it
> > and use it in Embperl. I can not find any doc describing how this is
done.
> > (I can require it in the Mason handler.pl)
>
> In embperl, you can require or use within [! !] and [- -] tags.
>
>

If you only want to require the module (and not import symbols, like "use"
does), it's the best to load it on server startup, for example via

PerlModule foo

in your httpd.conf

Gerald


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






Re: embperl [* *] does not work

2001-12-19 Thread Gerald Richter

> I am trying [* *] tag and the code as simple as this does not work.

Note that [* *] is experimetal and will not work always in 1.3.x (it does in
2.0)

> I am using embperl 1.3.2 build from theoryx5.uwinnipeg.ca for Windows.
>

Please upgrade to the newest version (1.3.4), because there where a number
of bug fixes for win32

> 
> Test
>
> [* $c = 5; *]
> count: [+ $c +]
> [* $c++; *]
> count: [+ $c +]
> -
>

This normaly should work without problems. If it doesn't work after an
upgrade try to replace [* *] with [- -]

Gerald

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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: Mason vs embperl

2001-12-19 Thread Chris Strom

"Lihn, Horng-Twu" <[EMAIL PROTECTED]> writes:

> I have a library of perl routine that I call in cgi-bin environment
> where I usually "require".  I could not find any way to require it
> and use it in Embperl. I can not find any doc describing how this is done.
> (I can require it in the Mason handler.pl)

In embperl, you can require or use within [! !] and [- -] tags.




XSLT templating Re: Mason vs embperl

2001-12-18 Thread dapi


BTW. Does anybody use XSLT templating realy? I found it is rather
useful and want to make new projects templates with it.

Perhaps, I didn't see some difficulties and it will be problems in the
future. Doesn't any body comment this thing?

I hope this is not badly off topic.

Thank you.

-- 
dapi



embperl [* *] does not work

2001-12-18 Thread Lihn, Horng-Twu

I am trying [* *] tag and the code as simple as this does not work.
I am using embperl 1.3.2 build from theoryx5.uwinnipeg.ca for Windows.

 
Test

[* $c = 5; *]
count: [+ $c +]
[* $c++; *]
count: [+ $c +]
-

  Steve Lihn
FIS Database Support, Merck & Co., Inc.
  Tel: (908) 423 - 4441





RE: Mason vs embperl

2001-12-18 Thread Lihn, Horng-Twu

I have a library of perl routine that I call in cgi-bin environment
where I usually "require".  I could not find any way to require it
and use it in Embperl. I can not find any doc describing how this is done.
(I can require it in the Mason handler.pl)

Can you shed a light? I think it has something to do with the object model
which I can not fully comprehend so far. 


  Steve Lihn
FIS Database Support, Merck & Co., Inc.
  Tel: (908) 423 - 4441



-Original Message-
From: Kee Hinckley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 12:38 PM
To: Lihn, Horng-Twu
Cc: [EMAIL PROTECTED]
Subject: Re: Mason vs embperl


At 11:39 AM -0500 12/18/01, Lihn, Horng-Twu wrote:
>Hi,
>I am planning a website and considering either
>using Mason or using embperl. I already digged into
>Mason and am reading embperl manual.
>Can someone shed some light about these two tools with regard to
>ease of use, current development effort, and the future support level?

That could start an interesting battle.

I'll just say that I've found support for embperl to be excellent, 
and that I went with it because it has an understanding of the 
underlying html, making it very easy to fill in forms, iterate over 
table rows with very little code.  Also, if you are doing database 
work, look at using Embperl in conjunction with DBIx::Recordset.  And 
of course, for Mason-style objects, look at EmbperlObject.

If perl is for lazy programmers, it seems to me that embperl carries 
on that tradition by being designed for lazy html scripters.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.




Re: Mason vs embperl

2001-12-18 Thread Ajit Deshpande

> [..]
> I am planning a website and considering either
> using Mason or using embperl. I already digged into
> [..]

Take a look at Perrin Harkin's article on "Choosing a Templating System"

http://www.perl.com/pub/a/2001/08/21/templating.html

Ajit



Re: Mason vs embperl

2001-12-18 Thread C.Hauser - IT assistance GmbH

Basel, Dienstag, 18. Dezember 2001, 19:02:12
.

*see original email below*


Hello Horng-Twu


I was evaluating tools like silverstream then I dropped over Mason. I
rejoiced a) Perl is my native IT language b) the system is not a
blackbox like the products promoted with bells and whistles.

After studying the excellent manual I went on a research on similar
systems and I dropped over embperl.

So I installed and compared. I preferred the syntax of Mason, the
flexible way to build components, the caching ... it have to be
said here that I choose Mason ... my arguments might be not
independent :-) I can say that Mason is fine integrated in mod_perl.

I use Dreamweaver for the publishers and the <% and <& commands are
properly displayed as ASP-icons. I use it with Modules Apache::Session,
Apache::Cookie, Net::SMTP ... Of course Mason-CM is cool!


Best Regards Christian  -  [EMAIL PROTECTED]  -

.

"Is it the idea or the names of it's incarnations, praise that there
is mod_perl and Mason|EmbPerl*" a newbie with first productive success.

(* many contributors not mentioned here,
   sorry the list would be far too long )


== beginn original ==
Date: Dienstag, 18. Dezember 2001, 17:39:32
Subject: Mason vs embperl


Hi,
I am planning a website and considering either
using Mason or using embperl. I already digged into
Mason and am reading embperl manual.
Can someone shed some light about these two tools with regard to
ease of use, current development effort, and the future support level?

Thanks,
Steve Lihn


=== end original 




Re: Mason vs embperl

2001-12-18 Thread Kee Hinckley

At 11:39 AM -0500 12/18/01, Lihn, Horng-Twu wrote:
>Hi,
>I am planning a website and considering either
>using Mason or using embperl. I already digged into
>Mason and am reading embperl manual.
>Can someone shed some light about these two tools with regard to
>ease of use, current development effort, and the future support level?

That could start an interesting battle.

I'll just say that I've found support for embperl to be excellent, 
and that I went with it because it has an understanding of the 
underlying html, making it very easy to fill in forms, iterate over 
table rows with very little code.  Also, if you are doing database 
work, look at using Embperl in conjunction with DBIx::Recordset.  And 
of course, for Mason-style objects, look at EmbperlObject.

If perl is for lazy programmers, it seems to me that embperl carries 
on that tradition by being designed for lazy html scripters.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED] (or ...!alice!nazgul for time travelers :-)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



Mason vs embperl

2001-12-18 Thread Lihn, Horng-Twu


Hi,
I am planning a website and considering either
using Mason or using embperl. I already digged into
Mason and am reading embperl manual.
Can someone shed some light about these two tools with regard to
ease of use, current development effort, and the future support level?

Thanks,
Steve Lihn




ANNOUNCE: Embperl 1.3.4

2001-12-05 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.4.tar.gz
  size: 356286 bytes
   md5: 1cfa47da50fd42c9d6cb5dc79ee73326

This is mainly a maintaince release with a few new features. I expect it to
be the last release of the 1.x series. All further development is made in
the 2.0 versions. The extented session support I have planed for this
release is also moved to the 2.0 development branch, altough there are some
enhancement in session management already build in.


Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Changes since 1.3.3:

   - Added method $r -> Espace for html & url escaping
   - URL escpage # to %23
   - use Content-Lenght HTTP Header instead of $ENV{CONTENT_LENGTH}
 when running under mod_perl and win32. This fixes a bug
 with POSTed data reported by Lukas Zapletal.
   - Display correct Apache module name in Makefile.PL when
 requesting path for Apache module. Patch from James Lee.
   - New session handling using Apache::SessionX. (This also
 fixes problem with MD5 and Perl 5.6.1)
   - Fixed a bug that cause file-uploads to fail for the first
 request to a file when running under EmbperlObject. Reported
 by Thoren Johne.
   - Added possibilities to add the session id as argument to any URL,
 instead of using cookies.
   - Added new hash %sdat which holds temporary sessins data.
   - Added options optAddUserSessionToLinks, optAddStatusSessionToLinks
 and optNoSessionCookies to control how the session id is passed.
   - Make sure the HTML::Embperl::Mail generates correct line endings
   - If Perl's STDOUT and/or STDIN are tied to any package, Embperl now
 calls the Perl methods PRINT and READ for doing I/O. This currently
 only works, when not running under mod_perl.
   - Embperl can now run under FastCGI. Use embpfastcgi.pl instead of
 embpcgi.pl.
   - Delete unnecessary PerlFixupHandler from httpd.conf.src for make test.
 Reported by David Merberg.
   - Add undef to %idat for select tag with nothing selected if
 optAllFormdata is set.
   - Cleanup of DBIx::Recordset objects now honors the setting in %CLEANUP.
 Problem reported by Kee Hinckley.
   - Embperl can now use encrypted sourcefiles. See crypto/README for
 details.
   - Embperl can now be installed as Apache and non Apache version on the
 same system. This is neccessary to work on Windows in- and outside of
 Apache.
   - Fixed a linkage problem with symbol embperl_module, first reported
 by GustavKristoffer Ek.
   - error message now always contain a filename.
   - Added optShowBacktrace to enable backtrace of filename in error
messages
   - Removed obsolete debug flags dbgDisableCache, dbgWatchScalar,
 dbgEarlyHttpHeader
   - Fixed problem with changeing to page directory on win32. Reported by
 Hans de Groot.
   - Fixed problems with mod_perl environement handling with ActiveState
Perl
 on win32.


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





ANNOUNCE: Embperl 2.0b5

2001-11-27 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-2.0b5.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-2.0b5.tar.gz
  size: 506804 bytes
   md5: e5836be6ad29f8658052e512e2427c74

This is mainly a bug fix release. The only new feature is the possibility to
pass parameters to xslt processors. Details about the new XML support can be
found in the announce for 2.0b4 (see
http://www.ecos.de/~mailarc/embperl/2001-11/msg00120.html)

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

With 2.0 this feature are extented to use XML/XSLT, extent the Embperl's
syntax, build taglibs, cacheing and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Changes since 2.0b4:

   - Add xsltparam parameter which takes a hashref and is used to
 pass parameters to the xslt processor. If not given defaults
 to %fdat.
   - Add require URI::URL to test.pl so make test work with newer LWP.
 Patch from Jonathan Stowe.
   - Fixed problem in registry/tied test, which failed for some Apache
 versions because of addtional http header. Patch from Jonathan Stowe.
   - Fixed problem with comments inside [! !] blocks. Reported by
 Alan Milligan.
   - Fixed compiling problem with very recent versions of libxslt.
 Reported by Michael Stevens and Jonathan Stowe.
   - Fixed make test so it skips session tests if Apache::SessionX isn't
 installed. Reported by from Jonathan Stowe.
   - Fixed path problem with Execute ({sub => foo,... }) on win32.
   - Fixed a problem with duplicate subroutine names when running
 multiple pages in the same package.
   - Fixed problem with reloading when file changed, which sometimes
 didn't reload correctly in 2.0b4
   - Fixed memory leak which occured when using libxslt.
   - Fixed MakeMaker problem with Perl 5.7.1.
   - Removed some uninitialized value warnings.
   - Added "make start" and "make stop" to start and stop test httpd


Enjoy

Gerald

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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





ANNOUNCE: Embperl 2.0b4

2001-11-20 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-2.0b4.tar.gz
  size: 507965 bytes
   md5: 03f8ca074b7588fa11ecb8002d4b50bd

Main new feature since 2.0b3 is the beginning support for XML, namely using
libxslt or Xalan to do XSLT transformations and the implementing of recipes,
which allows you to tell Embperl how to "cook" the result of a request by
pluging modules which provides different transformations together. Together
with the recipe handling the cacheing architecture has been enhanced to
properly support recipes and not only be able to cache resulting pages, but
any intermediate state.

NOTE: Embperl now use Apache::SessionX per default, see below how you can
use it with your old session config

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

With 2.0 this feature are extented to use XML/XSLT, extent the Embperl's
syntax, build taglibs, cacheing and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

For a list of all changes since 2.0b3 see the end of the mail.

For all Embperl 1.x users here is a sumary of the difference of Embperl 2.0:



Hints for using Embperl 2.x
---


Debugging
-

Starting with 2.0b2 Embperl files can debugged via the interavtive debugger.
The debugger shows the Embperl page source along with the correct
linenumbers.
You can do anything you can do inside a normal Perl programm via the
debugger,
e.g. show variables, modify variables, single step, set breakpoints etc.

You can use the Perl interacive command line debugger via

perl -d embpexec.pl file.epl

or if you prefer a graphical debugger, try ddd
(http://www.gnu.org/software/ddd/)
it's a great tool, also for debugging any other perl script:

ddd --debugger 'perl -d embpexec.pl file.epl'


NOTE: embpexec.pl could be found in the Embperl source directory

If you want to debug your pages, while running under mod_perl, Apache::DB is
the
right thing. Apache::DB is available from CPAN.


The following difference to Embperl 1.x apply:
--

- The following options can currently only set from the httpd.conf:
 optRawInput, optKeepSpaces

- The following options are currently not supported:
 optDisableHtmlScan, optDisableTableScan,
 optDisableInputScan, optDisableMetaScan

  optDisableHtmlScan can be replaced by switching the syntax e.g.

  [$syntax EmbperlBlocks $]  # same as [- $optDisableHtmlScan = 1 -]

  here goes your code, Embperl will not interpret any html tags here

  [$syntax Embperl $]# same as [- $optDisableHtmlScan = 0 -]


- Nesting must be properly. I.e. you cannot put a  tag (for an
  dynamic table) inside an if and the  inside another if.
  (That still works for static tables)

- optUndefToEmptyValue is always set and cannot be disabled.

- [$ foreach $x (@x) $] requires now the brackets around the
  array (like Perl)

- [+ +] blocks must now contain a valid Perl expression. Embperl 1.x
  allows you to put multiple statements into such a block. For performance
  reasons this is not possible anymore. Also the expression must _not_
  terminated with a semikolon. To let old code work, just wrap it into a do
  e.g. [+ do { my $a = $b + 5 ; $a } +]


The following things are not fully tested/working yet:
--

- [- exit -]

- safe namespaces

- print to OUT does not work correctly inside of loops


Embperl 1.x compatibility flag
--

If you don't have a separate computer to make the test setup, you can
include

PerlSetEnv EMBPERL_EP1COMPAT 1

at the top level of your httpd.conf, then Embperl will behave just the same
like Embperl 1.3b7. In the directories where you make your tests, you
include a

PerlSetEnv EMBPERL_EP1COMPAT 0

to enable the new engine.

but _DON'T_ use this one a production machine. While this compatibility mode
is tested and shows no problems for me, it's not so hard tested as 1.3b7
itself!


Addtional Config directives
---

Caching parameter
-

execute parameter / httpd.conf environment variable / name inside page (must
set inside [! !])


cache_key / EMBPERL_CACHE_KEY / $CACHE_KEY

literal string that is appended to the cache key



Re: EmbPerl for ActivePerl Distribution

2001-10-11 Thread Gerald Richter

> We have an HTML::Embperl ppm package (and also
> Apache::ASP and HTML::Mason) at
> http://theoryx5.uwinnipeg.ca/ppmpackages/
> which you can install via the ppm utility in the same way that
> the mod_perl package is installed from this location.
>

And everthing could be found in Embperl's INSTALL.pod file :-) see:
http://perl.apache.org/embperl/INSTALL.pod.1.html#WIN_32_with_ActiveState_Pe
rl

Gerald



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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: EmbPerl for ActivePerl Distribution

2001-10-11 Thread Randy Kobes

On Thu, 11 Oct 2001, Grant Babb wrote:

> all-
>
> don't even start with me about using win2K: sometimes (make that ALL the
> times) you don't get to make those kind of decisions.
> i loaded Apache and mod_perl onto a win2k box with ActivePerl.  everything
> compiled and started without errors, thanks to the magical binaries of Mr
> Kobes and the Winnipeg site.  Then I  find that ActivePerl has no EmbPerl
> module my sole reason for installing mod_perl.  I know they have some
> proprietary version, but i will gladly pass on that.

Hi,
We have an HTML::Embperl ppm package (and also
Apache::ASP and HTML::Mason) at
http://theoryx5.uwinnipeg.ca/ppmpackages/
which you can install via the ppm utility in the same way that
the mod_perl package is installed from this location.

best regards,
randy kobes




EmbPerl for ActivePerl Distribution

2001-10-11 Thread Grant Babb

all-

don't even start with me about using win2K: sometimes (make that ALL the 
times) you don't get to make those kind of decisions.
i loaded Apache and mod_perl onto a win2k box with ActivePerl.  everything 
compiled and started without errors, thanks to the magical binaries of Mr 
Kobes and the Winnipeg site.  Then I  find that ActivePerl has no EmbPerl 
module my sole reason for installing mod_perl.  I know they have some 
proprietary version, but i will gladly pass on that.

my question is this:
is there a perl module i can compile and place into the distribution I 
have, or do i have to install a different distribution of Perl and 
recompile mod_perl with the new Apache/Perl combo.

being able to use ActiveState's Perl distro is very valuable: the PPM is a 
very nice thing.

thanks in advance-
grant babb
Data Junction Corporation




Re: embperl

2001-09-08 Thread iain truskett

* Medi Montaseri ([EMAIL PROTECTED]) [08 Sep 2001 22:58]:

> Another advantage of Perl is that you can use this language in other
> situations as well. Unlike PHP, or ColdFusion or other languages who
> need something to tow them.
[...]

Much as I hate to give PHP a pro rather than a con, I must point out
that PHP can be used independently from a web service. It can be happily
used as a general purpose scripting language.

Of course, you don't get CPAN...


cheers,
-- 
iain.  

 PGP signature


Re: embperl

2001-09-08 Thread Medi Montaseri


Another advantage of Perl is that you can use this language in other
situations as well. Unlike PHP, or ColdFusion or other languages
who need something to tow them...you know like an RV without a head,
Perl has actaully an engine and gearbox as well.

On Fri, 7 Sep 2001, Diego V wrote:

> 
> 
> Hi there,
> 
> Just wanted to ask to any embperl user, is there any real advantage
> about using embperl instead of PHP ?
> 
> 
> Thank you
> 
> Diego Ventrice
> 
> _
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
> 
> 

-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems EngineerHTTP://www.CyberShell.com
CyberShell Engineering
-




Re: embperl

2001-09-07 Thread Ask Bjoern Hansen

On Fri, 7 Sep 2001, Diego V wrote:

> Just wanted to ask to any embperl user, is there any real advantage
> about using embperl instead of PHP ?

http:[EMAIL PROTECTED]/msg01457.html
http:[EMAIL PROTECTED]/msg01461.html


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/ !try; do();
more than a billion impressions per week, http://valueclick.com




Re: embperl

2001-09-07 Thread Perrin Harkins

> Just wanted to ask to any embperl user, is there any real advantage
> about using embperl instead of PHP ?

If you want a high-level summary of Embperl features, you could take a look
at my article on perl.com:
http://www.perl.com/pub/a/2001/08/21/templating.html

- Perrin




Re: embperl

2001-09-07 Thread Jim Cox


Well,... Now that makes some sense. I'll try that.


Thanks.

Jens-Uwe Mager wrote:
> 
> On Mon, May 07, 2001 at 02:44:13AM -0500, Jim Cox wrote:
> >
> >
> > This will sould like sour grapes,. But!
> >
> > Since PHP module compiles,... and Mod_Perl will not on AIX with
> > gcc compiler
> 
> As far as I have heard mod_perl will compile using gcc, only you must
> first compile your perl with gcc. As mod_perl picks up the compiler
> settings from the perl installation you must first compile perl with the
> proper compiler. But IBM does ship perl compiled using their compiler,
> so if you are lazy and do not recompile perl you are hosed.

I'm not the lazy type, just did not realize that.  I'm not using
the IBM perl distribution and I thought it was compiled with gcc,... but
I will check that.

> 
> --
> Jens-Uwe Mager
> 
> HELIOS Software GmbH
> Steinriede 3
> 30827 Garbsen
> Germany
> 
> Phone:  +49 5131 709320
> FAX:+49 5131 709325
> Internet:   [EMAIL PROTECTED]

-- 
Jim Cox (mailto:[EMAIL PROTECTED]) 
(817) 315-8134   (888) 834-7656 Toll Free
(817) 315-8253 FAX
(817) 233-8567 Mobile



Re: embperl

2001-09-07 Thread Jens-Uwe Mager

On Mon, May 07, 2001 at 02:44:13AM -0500, Jim Cox wrote:
> 
> 
> This will sould like sour grapes,. But!
> 
> Since PHP module compiles,... and Mod_Perl will not on AIX with 
> gcc compiler

As far as I have heard mod_perl will compile using gcc, only you must
first compile your perl with gcc. As mod_perl picks up the compiler
settings from the perl installation you must first compile perl with the
proper compiler. But IBM does ship perl compiled using their compiler,
so if you are lazy and do not recompile perl you are hosed.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:  +49 5131 709320
FAX:+49 5131 709325
Internet:   [EMAIL PROTECTED]



Re: embperl

2001-09-07 Thread iain truskett

* Jim Cox ([EMAIL PROTECTED]) [07 Sep 2001 08:03]:

> This will sould like sour grapes,. But!

> Since PHP module compiles,... and Mod_Perl will not on AIX with gcc
> compiler

> I'm thinkin' PHP is getting better and better all the time.

It's all a case of "use what works" =)

There's something peculiar with one of my Apaches in that it refuses to
use DSOs. And I've got mod_perl happily compiled into it.

On my home site, the admin of the machine has PHP installed but not
mod_perl.

At work, I haven't been able to convince the sysadmin to install either.
And if I do, he's more likely to go for PHP since it's less likely to
require many configuration changes. mod_perl can attach modules to any
part of a request/response phase and thus can be configured somewhat
complexly.

PHP is just a content handler, right?

mod_perl is an everything handler: content, headers, logging, URI
translation, etc. etc. It's more powerful. As far as I know, there's
nothing PHP can do that mod_perl can't.

Well, apart from compile on AIX with gcc =)


cheers,
-- 
iain.  



Re: embperl

2001-09-07 Thread Jim Cox



This will sould like sour grapes,. But!

Since PHP module compiles,... and Mod_Perl will not on AIX with 
gcc compiler

I'm thinkin' PHP is getting better and better all the time.

iain truskett wrote:
> 
> * Diego V ([EMAIL PROTECTED]) [07 Sep 2001 06:59]:
> 
> [...]
> > Just wanted to ask to any embperl user, is there any real advantage
> > about using embperl instead of PHP ?
> 
> You get the advantage of using Perl rather than PHP.
> 
> This includes the vast resources of CPAN.
> 
> Personally, I recommend Mason <http://www.masonhq.com/> over Embperl
> simply because I prefer the way it integrates into HTML.
> 
> Investigate both =)
> 
> I've done reasonably sized projects with both and find Mason cleaner
> (mostly in its handling of scope and the way it doesn't use all those [-
> [+ [# [$ [* etc. tags and instead just has <%, <%init and other wordy
> ones: easier to remember =). )
> 
> cheers,
> --
> iain.  <http://eh.org/~koschei/>
> "The only disadvantage I see is that it would force everyone to get
>  Perl. Horrors. :-)" --Larry Wall in <[EMAIL PROTECTED]>

-- 
Jim Cox (mailto:[EMAIL PROTECTED]) 
(817) 315-8134   (888) 834-7656 Toll Free
(817) 315-8253 FAX
(817) 233-8567 Mobile



Re: embperl

2001-09-06 Thread iain truskett

* Diego V ([EMAIL PROTECTED]) [07 Sep 2001 06:59]:

[...]
> Just wanted to ask to any embperl user, is there any real advantage
> about using embperl instead of PHP ?

You get the advantage of using Perl rather than PHP.

This includes the vast resources of CPAN.

Personally, I recommend Mason <http://www.masonhq.com/> over Embperl
simply because I prefer the way it integrates into HTML.

Investigate both =)

I've done reasonably sized projects with both and find Mason cleaner
(mostly in its handling of scope and the way it doesn't use all those [-
[+ [# [$ [* etc. tags and instead just has <%, <%init and other wordy
ones: easier to remember =). )


cheers,
-- 
iain.  <http://eh.org/~koschei/>
"The only disadvantage I see is that it would force everyone to get
 Perl. Horrors. :-)" --Larry Wall in <[EMAIL PROTECTED]>



embperl

2001-09-06 Thread Diego V



Hi there,

Just wanted to ask to any embperl user, is there any real advantage
about using embperl instead of PHP ?


Thank you

Diego Ventrice

_
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp




Re: Embperl, modules, cleanup and the stop button

2001-08-22 Thread Gerald Richter

>
> My feeling that this cleanup is infact unnecessary (all though worth
> having regardless), as the pipeline nature of the request (call
> database for *all* data required, *then* output), any database calls
> (and corresponding locks) will have completed before the abort
> (SIGPIPE) is recognised.  This should go double for embperl, which
> executes all perl code before outputting any headers and data.
>

The connection is only aborted, when data is send. So it's true that normaly
there is no abort before the whole page has processed within Embperl., but
there are other reason a page may fail. So it's a good idea to have a
cleanup. In an Embperl page you can define a function called CLEANUP which
will be call _always_, regardless what fails. It will be called after all
content is send to the browser.

Gerald


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






Embperl, modules, cleanup and the stop button

2001-08-20 Thread Steve Smith

Hi,

I realise this is covered in part in the modperl guide, but I'd to ask
for a bit of clarification/confirmation ...

I have pages generated with embperl, with each page having it's own
module to pull data from the database and pass it back to page in a
hash, the first line of the embperl page being the call to the module
(a pipeline/callback hybrid, if you like).  This module in turn
creates the appropriate database object.

As the database routines may create table locks, and as I'm using
Apache::DBI, the DB object constructor registers a cleanup handler
that will unlock the tables if an abort has occured
($r->connection->aborted).

My feeling that this cleanup is infact unnecessary (all though worth
having regardless), as the pipeline nature of the request (call
database for *all* data required, *then* output), any database calls
(and corresponding locks) will have completed before the abort
(SIGPIPE) is recognised.  This should go double for embperl, which
executes all perl code before outputting any headers and data.

So I'd like to ask the group, am I right in this analysis, or am I
missing anything here?

Thanks,
Steve



Re: ANNOUNCE: HTML::Embperl 2.0b3

2001-07-09 Thread Gerald Richter

> /usr/bin/pod2man: Invalid man page - 1st pod line is not NAME in
IntroD.pod
> Couldn't install blib/man3/HTML::Embperl::IntroD.3

That are only warnings about the docs, but

perldoc foo

for example

perldoc  HTML::Embperl::IntroD

will still work. So nothing to worry about. I try to fix this in the next
release

Gerald

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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: ANNOUNCE: HTML::Embperl 2.0b3

2001-07-09 Thread paul

"Gerald Richter" <[EMAIL PROTECTED]> wrote:

> The third beta of Embperl 2.0 is now available from
>  ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-2.0b3.tar.gz

I got the following errors during make on Linux 2.2.12-20 (Red Hat 6.1):-

/usr/bin/perl -I/usr/lib/perl5/5.00503/i386-linux -I/usr/lib/perl5/5.00503
-MExtUtils::MakeMaker -e "MY->fixin(shift)" blib/script/embpexec.pl
Manifying blib/man3/HTML::Embperl::IntroD.3
/usr/bin/pod2man: Invalid man page - 1st pod line is not NAME in IntroD.pod
Couldn't install blib/man3/HTML::Embperl::IntroD.3
Manifying blib/man3/HTML::Embperl::Syntax::RTF.3
/usr/bin/pod2man: Improper man page - no dash in NAME header in paragraph 67 of
Embperl/Syntax/RTF.pm

[ ... followed by many similar messages ...]


Regards

Paul Breslaw.




Re: problems compiling Embperl 1.3.3 on MacOS X 10.0.4

2001-07-08 Thread Gerald Richter

Hi,

unfortunately I don't know anything about MaxOS X. The only idea I have, is
to look at other Perl modules, that compiles successfully,
Makefile/Makefile.PL and see where the differences is.

Do you try to compile with or without mod_perl support ? I think you should
start without mod_perl support, because with mod_perl it will need to link
against Apache and this may cause problems.

Let me know if you find anything new!

Gerald

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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-

- Original Message -
From: "Gustav Kristoffer Ek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 4:08 PM
Subject: problems compiling Embperl 1.3.3 on MacOS X 10.0.4


When I try compiling Embperl, it dies when it comes to
blib/arch/auto/HTML/Embperl/Embperl.bundle:

cc -o blib/arch/auto/HTML/Embperl/Embperl.bundle  -bundle -undefined
suppress Embperl.o epmain.o epio.o epchar.o epcmd.o eputil.o epeval.o
epapinit.o

/usr/bin/ld: multiple definitions of symbol _embperl_module
Embperl.o definition of _embperl_module in section (__DATA,__common)
epmain.o definition of _embperl_module in section (__DATA,__common)
epio.o definition of _embperl_module in section (__DATA,__common)
epchar.o definition of _embperl_module in section (__DATA,__common)
epcmd.o definition of _embperl_module in section (__DATA,__common)
eputil.o definition of _embperl_module in section (__DATA,__common)
epeval.o definition of _embperl_module in section (__DATA,__common)
epapinit.o definition of _embperl_module in section (__DATA,__data)

Any thing I can do to bugtraq and resolve this?

- gustav

--
Gustav Kristoffer Ek,  Netcetera, Brolæggerstræde 4, 1211 København K
+45 33147000, +45 2045, fax +45 33146200 http://www.netcetera.dk/







problems compiling Embperl 1.3.3 on MacOS X 10.0.4

2001-07-06 Thread Gustav Kristoffer Ek

When I try compiling Embperl, it dies when it comes to
blib/arch/auto/HTML/Embperl/Embperl.bundle:

cc -o blib/arch/auto/HTML/Embperl/Embperl.bundle  -bundle -undefined
suppress Embperl.o epmain.o epio.o epchar.o epcmd.o eputil.o epeval.o
epapinit.o

/usr/bin/ld: multiple definitions of symbol _embperl_module
Embperl.o definition of _embperl_module in section (__DATA,__common)
epmain.o definition of _embperl_module in section (__DATA,__common)
epio.o definition of _embperl_module in section (__DATA,__common)
epchar.o definition of _embperl_module in section (__DATA,__common)
epcmd.o definition of _embperl_module in section (__DATA,__common)
eputil.o definition of _embperl_module in section (__DATA,__common)
epeval.o definition of _embperl_module in section (__DATA,__common)
epapinit.o definition of _embperl_module in section (__DATA,__data)

Any thing I can do to bugtraq and resolve this?

- gustav

-- 
Gustav Kristoffer Ek,  Netcetera, Brolæggerstræde 4, 1211 København K
+45 33147000, +45 2045, fax +45 33146200 http://www.netcetera.dk/




ANNOUNCE: HTML::Embperl 1.3.3

2001-06-05 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.3.tar.gz
  size: 345235 bytes
   md5: f2a4579210f7797e1ff4d756f3b7e037

 Embperl 1.3.2 is current stable version and this release contains mainly
bugfixes and a few enhancements.  Development of new features is going on in
Embperl 2.0 for which I expect to release 2.0b3 in a few days.

 Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Enjoy

Gerald

Changes since 1.3.2:

   - fixes problem with cleanup and Perl 5.6.0+ which broke
 session management. Spotted by Lukas Zapletal and Andy Lim.
   - Improved Makefile.PL to catche more setup situation on
 Win 32.
   - Make $r -> Error settable to be able to reset Embperl's
 internal error flag.
   - workaround for $r -> chdir_file not working correctly inside
 of Apache::Registry with ActiveState Perl, which caused
 make test to fail.
   - fixed SIGSEGVs that could occur on rare situations when
 multiple file not found errors are reported.
   - fixed problem with wrong setup of Content-Length header
 when running in CGI mode, with escmode = 0. Spotted by
 Edwin Ramirez.
   - fixed problem with nested dynamic tables and Execute.
   - added correct errror message for rcNotCompiledForModPerl.
 Spotted by Scott Chapman.


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





ANNOUNCE: HTML::Embperl 1.3.2

2001-05-15 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.2.tar.gz
  size: 341834 bytes
   md5: 3ba1d6ecd5958a45ab1a8819517e7672

Embperl 1.3.2 is current stable version and this release contains mainly
bugfixes and a few enhancements.  Development of new features is going on in
Embperl 2.0 for which I expect to release 2.0b3 in a few days.

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

 Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

 See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Enjoy

Gerald

Changes since 1.3.1:

   - Emulate the syntax => Text parameter of Embperl 2.0, which allows
 to include pure text files any without interpretation. Requested
 by Kee Hinckley.
   - Fixed problem with corrupted @ISA, that had occured when a page was
 first requested without EmbperlObject and then with EmbperlObject.
   - Catch exceptions inside of Embperl.pm and correctly cleanup the
 request. This avoids problems in further request in case anything
 was really going wrong.
   - If the base template in an EmbperlObject request is requested
 directly the Execute ('*') does nothing, to avoid
 endless recursion.
   - Fixed bug in SetSessionCookie which had called undefined method
 getinitalid.  Spotted by Sun Choi.
   - Removed wrong expire setting from SetSessionCookie, spotted
 by Michael Stevens.
   - Additions to IntroEmbperlObject.pod by Neil Gunton.
   - ';' is now accepcted as separator for query strings addtionaly
 to the '&' character. Patch from Brent A. Ellingson.
   - ';' is now escaped to %3B when outputed inside a URL.
   - Embperl is now added to the Serversoftware identification when
 preloaded under mod_perl.
   - adapted make test to Perl 5.6.1 and 5.7.1 so now it passes sucessfully.
   - fixed problem with cleanup in threaded Perl 5.6.1 and higher
   - added pod documentation to embperl.pl. Patch from Angus Lees.
   - %http_headers_out can take now array refs as elements to set multiple
 headers of the same value. Patch from Maxwell Krohn.
   - Non module-documenations (like Intro.pod Faq.pod etc) now gets copied
under
 the correct directory and man pages are generated with the correct name
 (e.g. perldoc HTML::Embperl::Intro works now after installation). Based
 on an idea from Angus Lees.
   - Makefile.PL enhancements for Apache/ActiveState binary distribution
   - quote pathnames in Makefile to allow directories like "Program Files".
 Spotted by Lukas Zapletal.
   - Added epocgi.pl which allow use of EmbperlObject as CGI script.
   - Added a dTHR to function CmdVar to make Embperl compile with threaded
 Perl 5.005. Patch from Michael George III.
   - EMBPERL_SESSION_ARGS can now accept pathes with spaces inside by
quoteing
 an argument e.g. PerlSetEnv EMBPERL_SESSION_ARGS "'Directory=/Session
Files/'".
 Spotted by Lukas Zapletal.
   - Perl search path (@INC) in make test is set to abosulte paths to be
independend
 of directory changes that Apache might issue. Spotted by Randy Korbes.


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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





ANNOUNCE: HTML::Embperl 2.0b2

2001-03-28 Thread Gerald Richter

The second beta of Embperl 2.0 is now available from

ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-2.0b2.tar.gz

The main news are the support for interactive debuggers and the possibility
to use different syntaxes (Embperl, SSI, ASP, pure Perl, Text only etc.)
along with various bugfixes.

Embperl is a system for building dynamic websites with Perl.
It gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

For all Embperl 1.x users here is a sumary of the difference of Embperl 2.0:

Hints for using Embperl 2.x
---

Embperl 2 has a totaly rewritten core. It contains nearly 7500 lines
new (mostly C-) code. Also I have done a lot of testing, there may
be still undiscovered bugs!

Please report any weired behaviour to the embperl mailing list, but
be sure to read this whole README to understand what can't work so far.

The Embperl core now works in a totaly different way. It is divided into
smaller steps:

1 reading the source
2 parseing
3 compiling
4 executing
5 outputing

Further version will allow to replace every single step of this pipeline
with custom modules. Also it will be possible to cascade multiple
processors. This allows for example to have Embperl and SSI in one file
and to parse the file only once, feeding it first to the SSI processor and
afterwards to the Embperl processor. Also the parser will be exchangeable
in future version to allow for example to use an XML parser and an
XSLT stylesheet processor.

These new execution scheme is also faster, because html tags and
metacommands
are parsed only once (Perl code was also (and is still) cached in 1.x)
My first benchmarks show 50%-100% faster execution under mod_perl for pages
longer then 20K (For short pages ( < 5K ouput) you won't see such a great
difference)
and without any external database access.

Another new feature is that the syntax of the Embperl parser is defined
within the module HTML::Embperl::Syntax and can be modified as nessecary.
Embperl comes with a set syntax definitons which can be extened modified by
the user. So far there are syntaxdefinitions for SSI, Text only, Perl only,
ASP and a Mail taglib. You can tell Embperl which syntax to use either in
the configuration via EMBPERL_SYNTAX, or with the syntax parameter of
Execute or you change the syntax dynamicly inside the page via the
[$syntax   $] command. You also could specify more then one syntax at the
same
time e.g. [$syntax Embperl SSI $] to mix Embperl tags and SSI tags in the
same
page.

If you like to create your own syntax read

perldoc HTML::Embperl::Syntax

and look at the files under Embperl/Syntax/ for examples how to do it.

Also new is the possibility to cache (parts of) the output. See
for the new configuration directives below


Debugging
-

Starting with 2.0b2 Embperl files can debugged via the interavtive debugger.
The debugger shows the Embperl page source along with the correct
linenumbers.
You can do anything you can do inside a normal Perl programm via the
debugger,
e.g. show variables, modify variables, single step, set breakpoints etc.

You can use the Perl interacive command line debugger via

perl -d embpexec.pl file.epl

or if you prefer a graphical debugger, try ddd
(http://www.gnu.org/software/ddd/)
it's a great tool, also for debugging any other perl script:

ddd --debugger 'perl -d embpexec.pl file.epl'


NOTE: embpexec.pl could be found in the Embperl source directory

If you want to debug your pages, while running under mod_perl, Apache::DB is
the
right thing. Apache::DB is available from CPAN.


The following difference to Embperl 1.x apply:
--

- The following options can currently only set from the httpd.conf:
 optRawInput, optKeepSpaces

- The following options are currently not supported:
 optDisableHtmlScan, optDisableTableScan,
 optDisableInputScan, optDisableMetaScan

  optDisableHtmlScan can be replaced by switching the syntax e.g.

  [$syntax EmbperlBlocks $]  # same as [- $optDisableHtmlScan = 1 -]

  here goes your code, Embperl will not interpret any html tags here

  [$syntax Embperl $]# same as [- $optDisableHtmlScan = 0 -]


- Nesting must be properly. I.e. you cannot put a  tag (for an
  dynamic table) inside an if and the  inside another if.
  (That still works for static tables)

- optUndefToEmptyValue

compile problems with mod_perl 1.25, apache 1.3.19 and embperl 1.3.1 on AIX 4.3.3

2001-03-23 Thread Aivo Kalu

Hello, 

I'm trying to get running Apache, mod_perl and embperl, but no success. It
seems like a problem of building a shared mod_perl module on AIX and
exporting apache symbols as well, to enable to build shared emb-perl module.


My steps so far:

gcc 2.95.2. Built myself and installed. 
perl 5.6.0. Built myself with configuration command 

sh Configure -Dcc=gcc -Doptimize='-O2' -Uuselargefiles -Duserperlio \
-Uusesfio -Dcccdlflags='none' -des

Also, applied patch which enables perl to use emulation layer for AIX native
dlopen. I'm grateful to Jens-Uwe Mager, who provided the patch. 

apache 1.3.19. Pached apache/src/os/unix/os.c and os.h so that AIX versions
over 4.3.3 isn't detected to enable apache to use emulation for AIX dlopen.
Also suggested by Jens-Uwe Mager. 

After that I tried to configure mod_perl with following command

perl Makefile.PL DO_HTTPD=1 USE_APACI=1 USE_DSO=1 EVERYTHING=1 DYNAMIC=1 \
APACI_ARGS="--enable-rule=SHARED_CORE --with-layout=GNU --enable-shared=max"

make failed. I had to modify apache/src/modules/perl/Makefile to remove
-Xlinker flags and also to define APACHELIBEXEC=/usr/local/lib. Also in
PERLLDDFLAGS there were 
-bE:$(BASEEXT).exp flag. However, the BASEXT wasn't assigned a value and
compile failed. I changed the flag to -bE:$(BASEEXT)libperl.exp. Is that
correct ? 

After this make succeeded with tons of warnings (Warning: Duplicate symbol
PL_* and Warning: Exported symbol not defined PL_*). make test failed with
message:

Target "all" is up to date.
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
./apaci/load_modules.pl ../apache_1.3.19/src
../apache_1.3.19/src/httpd -f pwd/t/conf/httpd.conf
-X -d pwd/t &
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...Syntax error on line 1 of
/home/aivo/mod_perl-1.25/t/conf/httpd.conf:
Cannot load
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so
into server: dlopen:
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so:
30
/home/aivo/mod_perl-1.25/t/../../apache_1.3.19/src/modules/perl/libperl.so36
ap_add_cgi_vars 225 httpd36 ap_add_common_vars 226 httpd36 ap_add_file_conf
227 httpd36 ap_add_per_dir_conf 228 httpd36 ap_add_per_url_conf 229 httpd36
ap_add_version_component 230 httpd36 ap_append_arrays 231 httpd36
ap_cfg_getline 232 httpd36 ap_child_terminate 233 httpd36 ap_cpystrn 234
httpd36 ap_create_per_dir_config 235 httpd36 ap_destroy_pool 236 httpd36
ap_error_log2stderr 237 httpd36 ap_find_command_in_modules 238 httpd36
ap_getword 239 httpd36 ap_getword_conf 240 httpd36 ap_handle_command 241
httpd36 ap_ind 242 httpd36 ap_init_virtual_host 243 httpd36 ap_is_fnmatch
244 httpd36 ap_limit_section 245 httpd36 ap_log_error 246 httpd36
ap_log_printf 247 httpd36 ap_make_array 248 httpd36 ap_make_sub_pool 249
httpd36 ap_make_table 250 httpd36 ap_matches_request_vhost 251 httpd36
ap_null_cleanup 252 httpd36 ap_overlay_tables 253 httpd36 ap_palloc 254
httpd36 ap_pcalloc 255 httpd36 ap_pcfg_open_custom 256 httpd36 ap_pregcomp
257 httpd36 ap_pstrcat 258 httpd36 ap_pstrdup 259 httpd36 ap_push_array 260
httpd36 ap_register_cleanup 261 httpd36 ap_server_argv0 262 httpd36
ap_server_root_relative 263 httpd36 ap_set_config_vectors 264 httpd36
ap_snprintf 265 httpd36 ap_srm_command_loop 266 httpd36 ap_table_add 267
httpd36 ap_table_get 268 httpd36 ap_table_set 269 httpd36 ap_table_setn 270
httpd36 core_module 271 httpd36 top_module 272 httpd
done

There are no messages in test error log file. 

Does anyone have some experience regarding the building (dynamic ?) mod_perl
on AIX ? 

If I build the (static ?) mod_perl with configuration command 

perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 \
APACI_ARGS="--enable-module=most --enable-shared=max \
--disable-shared=perl --disable-shared=include"

the mod_perl and apache compile and test fine, but compiling embperl files
with message

bash-2.04# make
LD_RUN_PATH="" ld -o blib/arch/auto/HTML/Embperl/Embperl.so
-bhalt:4 -bM:SRE -bI:/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp
-bE:Embperl.exp -b noentry -lc -L/usr/local/lib Embperl.o epmain.o epio.o
epchar.o epcmd.o eputil.o epeval.o epdbg.o
-bI:/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.exp
ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
ld: 

ANNOUNCE: HTML::Embperl 1.3.1

2001-02-12 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.1.tar.gz
  size: 328406 bytes
   md5: e58778ddd2e56ef129220a416818a525

The main improvements in this release is in EmbperlObject, which has
made more stable and reliable. Also an tutorial for EmbperlObject
has been added to the release.


Embperl gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects in
an object-oriented style. You can also take advantage of all the
usual Perl modules, (including DBI for database access) use their
functionality and easily include their output in your web pages.

Embperl has several features which are especially useful for creating
HTML, including dynamic tables, form field processing, URL
escaping/unescaping, session handling, and more.

See http://perl.apache.org/embperl/ (english) or
http://www.ecos.de/embperl/ (german) for more information.

Enjoy Gerald



Changes since 1.3.0:

   - Added new Introduction to EmbperlObject written by
 Neil Gunton. See perldoc IntroEmbperlObject
   - Added new Tips and Tricks pod written by
 Neil Gunton. See perldoc TipsAndTricks. Anybody is invited
 to send me their own Tips and Tricks!
   - Added object and isa parameters to Execute, which allows to get an
 object reference for a certain file and set the Perl inherence
 hierachive. Ideas from Neil Gunton and Angus Lees.
   - Corrected a problem that leads to very strange errors when an
 Embperl sub is called from an in memory source (that is passed
 via the Execute input parameter). Spotted by Neil Gunton.
   - Make EmbperlObject work better with relative paths and drive letters
 on Windows. Based on a patch from Freddy Vulto.
   - Fixed a problem with the cache key, which could cause that the same
 file is compiled within different packages.
   - Fixed a problem that Embperl are in a wired state after an file upload
 has been interrupted. Spotted by Dirk Lutzebaeck.
   - Fixed a problem set @ISA is not correctly setup in case a file is
 compiled in the same package as the base file of EmbperlObject.
 Spotted by Neil Gunton.
   - Fixed problem with including ../foo.html in EmbperlObject. Spotted
 by Neil Gunton.
   - Added warning if @ISA is not correctly setup/corrupted.
   - Fixed a SIGSEGV that occurs when an reference to undef is returned
 from a [+ +] inside a URL.
   - Added warning to Makefile.PL, if File::Spec 0.82 isn't installed, which
is
 required by EmbperlObject.
   - Fixed "use of undefined value" warning in make test



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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-





Re: mod perl and embperl

2001-01-17 Thread Gerald Richter

>
> I have installed mod_perl as a DSO for apache, everything is ok!
> Now i am in need for embperl, the problem begins when i perl
> Makefile.PL, it asks me for apache source!
> Since i have every apache module as DSO i have deleted everything
> related to apache.
>
> Hoe to enable embperl with mod_perl ?
>

Embperl needs only the header files, not the whole source. Apache normaly
installs these headers under include (e.g. /usr/local/apache/include),
specify this directory when asked for the sources and it should work.

Gerald


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

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





mod perl and embperl

2001-01-17 Thread Gustavo Vieira Goncalves Coelho Rios

hi folks!

Here am i again with some doubts once more.

I have installed mod_perl as a DSO for apache, everything is ok!
Now i am in need for embperl, the problem begins when i perl
Makefile.PL, it asks me for apache source!
Since i have every apache module as DSO i have deleted everything
related to apache.

Hoe to enable embperl with mod_perl ?



Re: ANNOUNCE: Embperl 2.0b1

2000-12-22 Thread Gerald Richter

>
> > Since it's not yet ready for production use, it's only available from my
ftp
> > server at
>
> Hmm, with unstable software I prefer to use cvs upd more often, isn't
> there a cvs repository anywhere? A stable version can also be fetched
> from an FTP archive, but for development versions this is a bit painful.
>

It is a branch in the normal Embperl cvs. You can check it out with

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co -r Embperl2c
embperl

Gerald







Re: ANNOUNCE: Embperl 2.0b1

2000-12-22 Thread Jens-Uwe Mager

On Fri, Dec 22, 2000 at 07:51:36AM +0100, Gerald Richter wrote:

> Since it's not yet ready for production use, it's only available from my ftp
> server at

Hmm, with unstable software I prefer to use cvs upd more often, isn't
there a cvs repository anywhere? A stable version can also be fetched
from an FTP archive, but for development versions this is a bit painful.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:  +49 5131 709320
FAX:+49 5131 709325
Internet:   [EMAIL PROTECTED]



ANNOUNCE: Embperl 2.0b1

2000-12-22 Thread Gerald Richter

After long time of talking, designing, developing, codeing and testing I am
now happy to announce the first beta of Embperl 2.0. It has a totaly
rewritten core and makes the way free for a lot of new possibilities...

At the moment it's mainly a speed improvement and introduces caching of the
(component) output. In the next releases I successively make the
possibilities of this new architecture available. (see the readme below for
some ideas what will happen).

Since it's not yet ready for production use, it's only available from my ftp
server at

ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-2.0b1.tar.gz

Enjoy

Gerald

README.v2:
==

Embperl 2 has a totaly rewritten core. It contains nearly 7500 lines
new (mostly C-) code. Also I have done a lot of testing, don't expect
it to work without errors!

Please report any weired behaviour to the embperl mailing list, but
be sure to read this whole README to understand what can't work so far.

The Embperl core now works in a totaly different way. It is divided into
smaller steps:

1 reading the source
2 parseing
3 compiling
4 executing
5 outputing

Further version will allow to replace every single step of this pipeline
with custom modules. Also it will be possible to cascade multiple
processors. This allows for example to have Embperl and SSI in one file
and to parse the file only once, feeding it first to the SSI processor and
afterwards to the Embperl processor. Also the parser will be exchangeable
in future version to allow for example to use an XML parser and an
XSLT stylesheet processor.

These new execution scheme is also faster, because html tags and
metacommands
are parsed only once (Perl code was also (and is still) cached in 1.x)
My first benchmarks show 50%-100% faster execution under mod_perl for pages
longer then 20K (For short pages ( < 5K ouput) you won't see such a great
difference)
and without any external database access.

Another new feature is that the syntax of the Embperl parser is defined
within the module HTML::Embperl::Syntax and can be modified as nessecary.
See the file Embperl/Syntax.pm how it looks like and

perldoc HTML::Embperl::Syntax

for a short description. A further verion will add an API to this syntax
module,
so custom syntaxes can be easily added, without modifiy Syntax.pm itself.

Also new is the possibility to cache (parts of) the output.


The following difference to Embperl 1.x apply:
--

- The following options can currently only set from the httpd.conf:
 optRawInput, optKeepSpaces

- The following options are currently not supported:
 optDisableHtmlScan, optDisableTableScan,
 optDisableInputScan, optDisableMetaScan

- Nesting must be properly. I.e. you cannot put a  tag (for an
  dynamic table) inside an if and the  inside another if.
  (That still works for static tables)

- optUndefToEmptyValue is always set and cannot be disabled.

- [$ foreach $x (@x) $] requires now the bracket around the
  array (like Perl)

- [+ +] blocks must now contain a valid Perl expression. Embperl 1.x
  allows you to put multiple statements into such a block. For performance
  reasons this is not possible anymore. Also the expression must _not_
  terminated with a semikolon. To let old code work, just wrap it into a do
  e.g. [+ do { my $a = $b + 5 ; $a } +]


The following things are not fully tested/working yet:
--

- [- exit -]

- [- print OUT "foo" -]

- safe namespaces


Embperl 1.x compatibility flag
--

If you don't have a separate computer to make the test setup, you can
include

PerlSetEnv EMBPERL_EP1COMPAT 1

at the top level of your httpd.conf, then Embperl will behave just the same
like Embperl 1.3b7. In the directories where you make your tests, you
include a

PerlSetEnv EMBPERL_EP1COMPAT 0

to enable the new engine.

but _DON'T_ use this one a production machine. While this compatibility mode
is tested and shows no problems for me, it's not so hard tested as 1.3b7
itself!


Addtional Config directives
---

execute parameter / httpd.conf environment variable / name inside page (must
set inside [! !])


cache_key / EMBPERL_CACHE_KEY / $CACHE_KEY

literal string that is appended to the cache key


cache_key_options / EMBPERL_CACHE_KEY_OPTIONS / $CACHE_KEY_OPTIONS

ckoptCarryOver = 1, use result from CacheKeyFunc of preivious step
if any
ckoptPathInfo  = 2, include the PathInfo into CacheKey
ckoptQueryInfo = 4, include the QueryInfo into CacheKey
ckoptDontCachePost = 8, don't cache POST requests  (not yet implemented)

Default: all options set


expired_func / EMBPERL_EXPIRES_FUNC / &EXPIRES

function that should be called when build a cache key. The result is
appended to the cache key.


cache_key_func / EMBPERL_CACHE_KEY_FUNC /

Re: HTML::Embperl::Execute modifying 'output' only once

2000-12-15 Thread Gerald Richter

>
> I wrote some code for a forum, that displays user entered text,
> turning all URLs found into real links. Here it is:
>
> [- @t = split(/\x0d\x0a/, $message); $r = '';
>{
>  local $/ = "\x0d\x0a"; # for chomp below
>  for($i=0;$i < scalar @t;$i++) {
>$out = ''; $t = $t[$i];
>HTML::Embperl::Execute({'escmode' => 1,
>'input' => \$t,
>'output' => \$out,
>'mtime' => undef});
>chomp $out;
>$out =~ s@((?:ftp|http|news)://[^ ]*[^ .,:;!?<>()])@<A
> HREF="$1">$1</A>@gi;
>$r .= "<BR>\n" if $r;
>$r .= $out;
>  }
>} -]
>[+ local $escmode=0; $r +]
>


>
> It may not be optimal, but it works well. I tried to put that code in
> a Perl module, since it looks quite reusable:
>
> package XXX;
> use strict;
> use lib qw(..);
> use Exporter ();
> use HTML::Embperl ();
> use vars qw(@ISA @EXPORT_OK);
> @ISA = qw(Exporter);
> @EXPORT_OK = qw(UserText);
>
> sub UserText($) {
>   my($Text) = @_;
>   {
> local $/ = "\x0d\x0a"; # for chomp below
> return join("\n",
>   map { my $out;
> HTML::Embperl::Execute({'escmode' => 1,
> 'input' => \$_,
> 'output' => \$out,
> 'mtime' => undef});
>     chomp $out;
> $out =~ s@((?:ftp|http|news)://[^ ]*[^ .,:;!?<>()])@ HREF="$1">$1@gi;
> $out }
>   split(/\x0d\x0a/, $Text)
> );
>   }
> }
>
> 1;
>

Why do you Execute every line spepartely? Why not just process the while
file at once. That will be much faster...


> It looks like HTML::Embperl::Execute() only modifies $out during the
> first loop.
>

You should give a name to your code for Embperl cache management. Try to add
the inputfile parameter and set it a any value

 HTML::Embperl::Execute({'escmode' => 1,
 'input' => \$_,
 'output' => \$out,
 'inputfile' => 'mycode'});

Also you can leave out the mtime => undef (but it doesn't hurt)

Gerald



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

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-






HTML::Embperl::Execute modifying 'output' only once

2000-12-14 Thread Pierre Etchemaïté

Hi All, hi Gerald,

I wrote some code for a forum, that displays user entered text,
turning all URLs found into real links. Here it is:

[- @t = split(/\x0d\x0a/, $message); $r = '';
   {
 local $/ = "\x0d\x0a"; # for chomp below
 for($i=0;$i < scalar @t;$i++) {
   $out = ''; $t = $t[$i];
   HTML::Embperl::Execute({'escmode' => 1,
   'input' => \$t,
   'output' => \$out,
   'mtime' => undef});
   chomp $out;
   $out =~ s@((?:ftp|http|news)://[^ ]*[^ .,:;!?<>()])@<A
HREF="$1">$1</A>@gi;
   $r .= "<BR>\n" if $r;
   $r .= $out;
 }
   } -]
   [+ local $escmode=0; $r +]


It may not be optimal, but it works well. I tried to put that code in
a Perl module, since it looks quite reusable:

package XXX;
use strict;
use lib qw(..);
use Exporter ();
use HTML::Embperl ();
use vars qw(@ISA @EXPORT_OK);
@ISA = qw(Exporter);
@EXPORT_OK = qw(UserText);

sub UserText($) {
  my($Text) = @_;
  {
local $/ = "\x0d\x0a"; # for chomp below
return join("\n",
  map { my $out;
HTML::Embperl::Execute({'escmode' => 1,
'input' => \$_,
'output' => \$out,
'mtime' => undef});
chomp $out;
$out =~ s@((?:ftp|http|news)://[^ ]*[^ .,:;!?<>()])@$1@gi;
$out }
  split(/\x0d\x0a/, $Text)
);
  }
}

1;

When called from command-line using a Perl script, all seems fine.
>From a HTML page, code becomes :

[- use XXX qw(UserText); -]
...
[+ local $escmode=0; UserText($message) +]
...

But now, if $message contains several lines, UserText($message)
contains the conversion of the first line of $message, several times.
It looks like HTML::Embperl::Execute() only modifies $out during the
first loop.

What am I missing ?


-- 
Linux blade.workgroup 2.4.0-test10 #1 Thu Dec 7 12:47:22 CET 2000 i686 unknown
 10:20am  up 1 day, 14:50,  8 users,  load average: 1.34, 1.73, 1.55


-- 
Linux blade.workgroup 2.4.0-test10 #1 Thu Dec 7 12:47:22 CET 2000 i686 unknown
  4:09pm  up 1 day, 20:40,  7 users,  load average: 1.16, 1.15, 1.18




ANNOUNCE: HTML::Embperl 1.3.0

2000-12-04 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.0.tar.gz
  size: 309786 bytes
   md5: d62c04100c70161733c9ff38602ee528

After nearly a year of beta test, the final 1.3.0 release is out.
Beside a lot of enhancements, EmbperlObject, which allows you to
build your web site out of small reusable objects
in a OO-style, is the main improvement since 1.2.1.

Embperl gives you the power to embed Perl code in your HTML documents
and the ability to build your Web site out of small reusable objects
in a OO-style. You can also take advantage all available Perl modules,
(including DBI for database access) use their functionality and easily
include their output into your web pages.

Embperl has several features especially useful for creating HTML,
including dynamic tables, formfield-processing, escaping/unescaping,
session handling, and more.

See http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more informations.

Enjoy

Gerald


Changes since 1.3b7:

   - Corrected a wrong test, that let make test fail. Spotted by Eddie Lau.
   - Added a Line Feed at the end of epnames.h, which has caused some
problems
 with on old SunOS compiler. Spotted by Roman Maeder.
   - Fixed a problem that Perl generated an error when $req_rec and [$ var
$] was
 used. Spotted by Michael Stevens.



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

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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




strange apache behavior w. Embperl and multilang support

2000-11-15 Thread Mikko Harjula

I have 'fi' and 'en' set as preferred laguages.  I have code in
menu.epl.en and emacs backup in menu.epl.en~, no other menu.epl*
files exist.

I try to fetch a page http://phi.sqc/new/menu.epl?a=a and instead of
displaying the page netscape prompts with a "save as" dialog box
saying content type as "application/x-httpd-cgi"!  If I save it to a
file it contains the emacs backup file.

The problem goes away if I do any one of the following:

- take away the "?a=a" from the request
- delete the menu.epl.en~ file
- change epl to html (of course the embperl code stops working)
- don't use multilang support, i.e. rename menu.epl.en to menu.epl

What seems to happen is that when trying to locate the best language
match Apache prefers the menu.epl.en~ over the menu.epl.en (but only
with non .html files and with ?a=a arguments) and failes to match the
.epl to type text/html.

My apache config has:

AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
AddLanguage fi .fi

LanguagePriority en fi fr de

AddType text/html .epl

Directory /home/httpd/html/new>
Options +MultiViews

  SetHandler perl-script
  PerlHandler HTML::Embperl
  Options +ExecCGI +MultiViews



On RedHat 6.2 I'm running:

apache apache-1.3.12
perl-5.00503
mod_perl-1.21
embperl 1.3b5
netscape 4.75



ANNOUNCE: HTML-Embperl 1.3b7 (pre 1.3)

2000-11-15 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3b7.tar.gz
  size: 306074 bytes
   md5: 257487aa3fd8343b130930a58dd97a65


 Embperl is a module for embedding Perl code in HTML pages. It has a lot of
features, which should make dealing with HTML easy, including building
pages/sites out of small reusable objects/components and session handling.

See http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/
(german) for more informations.

 This is hopefully really the last release before the final 1.3 release. I
have
made a lot of enhancements in session handling.

Please give it a try and report me any problems.

 Enjoy

 Gerald

Changes since 1.3b6:

   - Fixed problem that call to close triggers error in Session.pm when
using Store::File.
 Spotted by Alvar Freude.
   - Fixed problem that GetSession doesn't return a value for new session.
 Spotted by Angus Lees.
   - Added new function SetSessionCookie, which can be used to set the
session cookie
 header in case you use Embperl session management, but don't use a
     Embperl page in that request. Suggested by Alex Schmelkin.
   - Fixed problem that DeleteSession does not work outside the base
template, when
 used with EmbperlObject. Spotted by Angus Lees.
   - Fixed problem when use multiple nested ../foo.htm inside EmbperlObject.
 Spotted by Neil Gunton.
   - Included patch from Angus Lees to ease building on debian.
   - make test now works again with BEN-SSL httpsd. With help from Neil
Gunton.
   - Included grammaticaly updated Embperl.pod. Many thanks to Ilia Lobsanov
 for doing the proof reading.
   - removed dbgDisableCache to avoid problems with this "feature" that
isn't working
 anymore for a long time.
   - Added validaten for session cookie. If Apache::Session 1.53+ is
installed
 it uses the validate method from Apache::Session::Generate::xxx. If a
invalid
 session id is found a new one is generated. Spotted by Angus Lees.
   - If a not existing session id is received, Embperl generates now a new
one.
   - Enhancements of Cookie resending logic. To make sure cookies are send
when
 neccessary, but not more often. (Handles now write to session data,
after
 a delete in the same request correctly).
   - Added more tests for Sessionhandling.
   - Fixed a bug that Content-Lenght was 2 to much, when escmode was set to
zero.
 Spotted by Michael Smith.
   - Added patches from Randy Korbes for ActiveState Support. Most tests
with
 Embperl under mod_perl nows passes. The few remaining ones that doesn't
pass
 seems to be due to problems of mod_perl's enironment handling.
   - Droped support for Apache::Session 0.17. Embperl now support only
 Apache::Session 1.00 and higher.
   - Added new option: optDisableSelectScan, to allow processing of SELECT
tags,
 while processing of TABLE tags is disabled. Suggested by Robert.
   - Carridge Returns are only removed for Perl 5.004. This makes using of
 HERE documents possible on Perl 5.005+, even if the documents has CRLF
 as lineendings.


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

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





Re: problems with HTML::Embperl on macos x (darwin)

2000-11-13 Thread Gustav Kristoffer Ek

On Mon, 13 Nov 2000, Gerald Richter wrote:

[...]
> Does mod_perl build and run correctly ?

Yes, it does. But I have a similar problem with Apache::Request though

> If yes, we can maybe look at it's Makefile, to see what's different.

you meen modperls' Makefile right?

I think it has something to do with the way MacOS X handles libs and
headers. It has something they call bundles, witch I think is some kind of
pakage with both header and lib in it. It also uses 'dyld' shared object
linker as I understand it.

> If you find anything out, let me know

I think I'll try asking the folks on the MacOS X list about this linker
thing.

- gustav

-- 
Gustav Kristoffer Ek,  Netcetera, Brolæggerstræde 4, 1211 København K
+45 33147000, +45 2045, fax +45 33146200 http://www.netcetera.dk/




Re: problems with HTML::Embperl on macos x (darwin)

2000-11-13 Thread Ray Zimmerman

At 1:17 PM -0500 11/13/00, Ruben I Safir wrote:
>Is that the new Machintosh BSD OS?

Yes. Darwin refers to the open source BSD layers, and Mac OS X refers 
to the whole thing including the new Aqua UI on top and the Classic 
compatibility environment for running previous Mac OS apps.

Mac OS X is currently available from Apple (for $30) as a Public 
Beta. There is also a Mac OS X Server product which has been a 
shipping product for some time now, which is based on an earlier 
version of much of the same technology.

A lot of this stuff is built on the old NextStep stuff.

Personally, I'm hoping this will live up to the goal of a nice Mac UI 
on top of a real, honest-to-goodness Unix.

Ray



Re: problems with HTML::Embperl on macos x (darwin)

2000-11-13 Thread Ruben I Safir

Is that the new Machintosh BSD OS?



Re: problems with HTML::Embperl on macos x (darwin)

2000-11-13 Thread Gerald Richter

>> nm httpd
>>
>> are missing ones listed ?
>
>No one of them are listed. Think I have to figure out how the
>linker/compiler works on macos x in details.
>
>Any other suggestions?

Sorry, I don't even know what "macos x" is...

Does mod_perl build and run correctly ?

If yes, we can maybe look at it's Makefile, to see what's different. Maybe
this helps, maybe not because mod_perl is slightly different, because it's
an Apache module and not a Perl mdoule (actualy it's both, but from the
point of Apache it's a Apache module)

If you find anything out, let me know

Gerald



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

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





Re: problems with HTML::Embperl on macos x (darwin)

2000-11-13 Thread Gustav Kristoffer Ek

On Mon, 13 Nov 2000, Gerald Richter wrote:

> >loading...dyld: /usr/bin/perl Undefined symbols:
> >_ap_get_client_block
> >...
> 
> Mostly this is because the symbols have been striped from the Apache binary
> after build. You can see the public symbols of the httpd binary with
> 
> nm httpd
> 
> are missing ones listed ?

No one of them are listed. Think I have to figure out how the
linker/compiler works on macos x in details.

Any other suggestions?

- gustav

-- 
Gustav Kristoffer Ek,  Netcetera, Brolæggerstræde 4, 1211 København K
+45 33147000, +45 2045, fax +45 33146200 http://www.netcetera.dk/




Re: problems with HTML::Embperl on macos x (darwin)

2000-11-12 Thread Gerald Richter


>PERL_DL_NONLAZY=0 /usr/bin/perl -Iblib/arch -Iblib/lib
>-I/System/Library/Perl/darwin -I/System/Library/Perl test.pl
>
>loading...dyld: /usr/bin/perl Undefined symbols:
>_ap_get_client_block
>...

Mostly this is because the symbols have been striped from the Apache binary
after build. You can see the public symbols of the httpd binary with

nm httpd

are missing ones listed ?

Gerald

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

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





problems with HTML::Embperl on macos x (darwin)

2000-11-12 Thread Gustav Kristoffer Ek

I have compiled the latest embperl from cpan (1.3b6) with apache
support, but when I try make test I got:

PERL_DL_NONLAZY=0 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/System/Library/Perl/darwin -I/System/Library/Perl test.pl 

loading...dyld: /usr/bin/perl Undefined symbols:
_ap_get_client_block
_ap_log_error
_ap_palloc
_ap_pstrdup
_ap_rflush
_ap_rputc
_ap_rwrite
_ap_send_http_header
_ap_set_content_length
_ap_setup_client_block
_ap_should_client_block
_ap_table_add
_ap_table_set
make: *** [test_dynamic] Error 67

Versions is:
Embedded Perl version v5.6.0 for Apache/1.3.15-dev
(Darwin) mod_perl/1.24_02-dev

running on macos x (darwin) and compiled with cc 2.7.2.1

what to do?

- gustav

-- 
Gustav Kristoffer Ek,  Netcetera, Brolæggerstræde 4, 1211 København K
+45 33147000, +45 2045, fax +45 33146200 http://www.netcetera.dk/




[JOB] mod_perl/Embperl job in Germany

2000-10-30 Thread Gerald Richter


We are searching a mod_perl/Embperl programmer (or somebody who wants to
become one) for a job in Germany (near Mainz)

If you are interessted please view details at
http://www.ecos.de/x/index.htm/jobs/r_jobs.htm or send me a mail to
[EMAIL PROTECTED]

Gerald

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

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





ANNOUNCE: HTML-Embperl 1.3b6 (pre 1.3)

2000-10-18 Thread Gerald Richter


The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3b6.tar.gz
  size: 300443 bytes
   md5: a57165c6a75b3c8d33ca8b2833c671fc

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.

This is hopefully the last release before the final 1.3 release. I have
added
some more session stuff and enhanced EmbperlObject. Please give it a try
and report me any problems.

Enjoy

Gerald

Changes since 1.3b5:

   - Embperl now runs on ActiveState Perl. (At least in offline mode,
 mod_perl mode seems to still have some problems). With a lot of help
 from Randy Korbes.
   - Changed EmbperlObject search order:
 * If EMBPERL_OBJECT_STOPDIR is set, this directory is taken as
   the last directory in the normal search path, instead of the
   directory where the base template (EMBPERL_OBJECT_BASE) is found.
 * EMBPERL_OBJECT_ADDPATH is _always_ added to the search path
 * Now Embperl also searches the path for files like
   ../foo.html, or bar/foo.html, which includes a relative path.
   - ../* is now a shortcut for the requested file, but in the
 parent directory (or upper depending on the search path)
   - Added access to Embperl session handling for modules and
 calling scripts (see SetupSession and GetSession)
   - Embperl is now able to output binary data if EMBPERL_ESCMODE
 and/or $escmode is zero. This also include that no CRLF is
 added at the end of the file, if escmode is zero.
   - Added method for deleting session data and cookie
   - Added method for triggering resend of session cookie.
   - Added Test for pnotes ('EMBPERL_ERRORS')
   - Added hash %CLEANUPFILE. All variables defined into the files given
 in this hash, are also cleanup at the end of the request.
 Patch from Todd Eigenschink.
   - Changed the way the C Requestobject is attached to the Perlobject,
 so it should now also work on 64Bit Processor like Alpha.
 Spotted by Andre Landwehr.
   - Fixed a problem with importing files that contains foreach and
 do until loops, which may caused a syntax error or endless
 loop. Spotted by Steffen Geschke.
   - embpcgi* and embpexec* are now geratated out of *.templ instead
 of editied in place to avoid problems with cvs conflicts
 and lower/uppercase on Win32. Suggest by Jens-Uwe Mager.
   - make test works with Apache that has mod_jserv compiled in
   - Embperl now cache same files with relative path, which are located
 in different directories correctly.


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

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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Perl/Embperl jobs in Berlin, Germany

2000-09-12 Thread Dirk Lutzebaeck


Sorry guys and gals the rest is in german:

Wir suchen professionelle Perl-Entwickler in Berlin zur Unterstuetzung
der Weiterentwicklung eines HTML-basierten Kommunikationssystems
fuer die Bauindustrie. Wir haben beste Kundenkontakte und sind
z.B. beim Umbau des Olympia-Stadions in Berlin (ein 700 MDM Projekt)
beauftragt.

Interessenten sollten mehrjaehrige Perl-, HTML- und UNIX-Erfahrung
haben. Wir setzen auf Modperl, Embperl und Postgresql unter Linux und
Solaris. Auf der Applikationsebene laeuft unser System ausschliesslich
unter Perl. Aktuelle Themen sind XML, UTF, Adobe FDF, LDAP,
Testsuites, Help System, Load Balancing, Security. Eine Demo ist
freigeschaltet unter http://www.aeccom.com

Wir sind ein unabhaengiges, junges und hochmotiviertes Unternehmen im
Umfeld internationaler Bau-Konzerne. Alle Zeichen stehen auf Wachstum.

Kontakt:

Dirk Lutzebaeck
AEC/communications GmbH, Berlin
Email: [EMAIL PROTECTED]
Tel: +49-30-639267-23
Fax: +49-30-639267-21
Web: http://www.aeccom.com




Re: Random Hangs when loading a embperl page

2000-09-01 Thread Gerald Richter

> >>
> >> Basically what happens is that some times a page will hang while
> > executing...
> >
> > Is it a POST request? Is the page invoke by the mod_perl handler or do
you
> > call it from your own script via Execute?
>
> POST & GET.  This happens by far the most when access via Netscape 4.75
for
> PowerPC via HTTPS.  Doesn't happen as often on IE or Netscape on Windows
or
> Linux.
>

I think you should that EMBPERL_DEBUG to 2285 and watch the embperl.log
file, there you should see at which point your script hangs.

Then we maybe can clearer see the reason

Gerald





Re: Random Hangs when loading a embperl page

2000-09-01 Thread Wim Kerkhoff


On 01-Sep-2000 Gerald Richter wrote:
>>
>> Basically what happens is that some times a page will hang while
> executing...
> 
> Is it a POST request? Is the page invoke by the mod_perl handler or do you
> call it from your own script via Execute?

POST & GET.  This happens by far the most when access via Netscape 4.75 for
PowerPC via HTTPS.  Doesn't happen as often on IE or Netscape on Windows or
Linux.

It's called as /dir/something.html.

-
access.conf:

PerlRequire /etc/apache/startup.pl

SetEnv EMBERL_DEBUG 0
SetEnv EMBPERL_OPTIONS 2048
PerlSetEnv EMBPERL_FILESMATCH \.htm$
PerlSetEnv EMBPERL_FILESMATCH \.html$


PerlSendHeader Off
SetHandler  perl-script
Options ExecCGI
PerlHandler HTML::Embperl
order allow,deny
allow from all


Regards,

Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
[EMAIL PROTECTED]



Re: Random Hangs when loading a embperl page

2000-09-01 Thread Gerald Richter

>
> Basically what happens is that some times a page will hang while
executing...

Is it a POST request? Is the page invoke by the mod_perl handler or do you
call it from your own script via Execute?

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

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





Random Hangs when loading a embperl page

2000-09-01 Thread Wim Kerkhoff

I've been expierence this problem for a while now, and users of the site are as
well, so I thought it's time to see what is causing this.

Basically what happens is that some times a page will hang while executing...
The browser is still connected to the server, but has not received the whole
page.  It'll sit there for a long time, until the user cancels the page. 
Upon reload, it comes up immediately and lightening fast.  This isn't the first
execute of the page either.  This is through https.

I'm running:

Apache/1.3.12
mod_perl/1.24 (compiled in)
mod_ssl/2.6.4 (compiled in)
OpenSSL/0.9.5a (compiled in)

HTML-Embperl-1.3b3 
Linux 2.2.12

Here's the httpd process that are currently running.  The SIZE kind of worries
me... is this normal?

  PID USER PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
27391 www-data   0   0 20104  19M  8620 S   0  0.0  3.8   0:12 httpd
 9930 www-data   0   0 18952  18M  8624 S   0  0.0  3.6   0:04 httpd
 9974 www-data   0   0 18448  18M  8656 S   0  0.0  3.5   0:04 httpd
10400 www-data   0   0 17700  17M  8700 S   0  0.0  3.4   0:02 httpd
12637 www-data   0   0 17504  17M  9104 S   0  0.0  3.3   0:01 httpd
12665 www-data   0   0 17188  16M  9000 S   0  0.0  3.3   0:01 httpd
12666 www-data   0   0 16976  16M  9196 S   0  0.0  3.2   0:01 httpd
17771 www-data   0   0 16204  15M  9664 S   0  0.0  3.1   0:00 httpd
19095 root   0   0  9628 9628  8212 S   0  0.0  1.8   0:00 httpd

I have these modules preloaded by startup.pl:

use DBI;
use DBD::Oracle;
use Apache::Registry;
use Apache;
use HTML::Embperl;
use CGI qw(:standard);
use nmSql;
use Admin;
use Apache::AdminAuth;
use Apache::NotFound;
use GIFgraph::pie();
use Apache::LogDBI;
use Apache::Redirect;
use CGI::Cookie;
use Apache::ExtractMedia;

[This message sent separatly to [EMAIL PROTECTED] -- forget to Cc: when I
sent that one]

Regards,

Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
[EMAIL PROTECTED]



ANNOUNCE: HTML::Embperl 1.3b5 (pre 1.3)

2000-08-20 Thread Gerald Richter

The URL

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

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3b5.tar.gz
  size: 282226 bytes
   md5: 812c620f5123b91c74b0c46a24d573d0


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 next release of Embperl should be the final 1.3 release. So give this
beta a try and tell me if you find any problems with it.

Enjoy

Gerald

Changes since 1.3b4:

   - Embperl now supports Apache::Session 1.52. See "Session handling"
 in the docs, how the setup has changed.
   - Fixed a problem with POSTed data, which had got lost for the first,
 request when using EmbperlObject handler. Spotted by
 Kaare Rasmussen.
   - Fixed a typo in HTML::Embperl::Mail, spotted by Robert.
   - changed require to use HTML::Embperl in EmbperlObject to avoid problems
 with dynamic loading. Spotted by Robert.
   - Embperl takes the cookie for session handling from the Apache
 request record to make it available in earlier phases then the
 content handler. Suggested by Jack Cushman.
   - added entity decoding for value attribute of radio/checkboxes.
 Spotted by Chris Thorman.
   - %fdat is not resetup when already done and formtype is
 multipart/formdata. Spotted by Michael Slade.
   - Embperl inserts & instead of a signle & inside query strings
 when expaned from array or hash refs.
   - Embperl now also accepts hashref inside a url and expand it
 to a query_string i.e.  will
become
 .
   - EMBPERL_COOKIE_EXPIRES now also supports relativ times like:
 +30s +10m +1h -1d +3M +10y
   - $req_rec -> pnotes ('EMBPERL_ERRORS') could be used to retrieve
 error message inside a error document
   - make Embperl compile and run with threaded Perl 5.6. With help
 from Jason Bodnar. NOTE: That doesn't mean that Embperl is
 threadsafe!


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

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





RE: Help Embperl

2000-08-05 Thread Jeff Smelser

No problem:



Jeff's Stock Page



[$ if $ENV{REQUEST_METHOD} eq 'GET' $]
This is a GET request
[$ elsif $ENV{REQUEST_METHOD} eq 'POST' $]
This is a POST request
[$ else $]
This is not GET and not POST
[$ endif $]



Thanks,
Jeff


On Sat, 5 Aug 2000, Jason Bodnar wrote:

> Please send the file for the url you're getting the error with.
> 
> On 05-Aug-2000 Jeff Smelser wrote:
> > I got EMbperl to compile. It when I did make test, everything went great.
> > OK's down the line. I set up apache with:
> > 
> > 
> > SetHandler perl-script
> > PerlHandler HTML::Embperl
> > 
> > 
> > This is what apache says when I restarted it:
> > 
> > [10843]ERR:  25: Line 1: Error 
> > [Sat Aug  5 16:10:00 2000] [notice] Apache/1.3.9 (Unix)  (Red Hat/Linux)
> > mod_perl/1.21 configured -- resuming normal operations
> > 
> > This is what it says when I test is with test.html: 
> > 
> > Bareword found where operator expected at /home/httpd/perl/test.html line
> > 3, near "Jeff's"
> > (Missing operator before Jeff's?)
> > Bareword found where operator expected at /home/httpd/perl/test.html line
> > 5, near "/TITLE>
> >  >   (Might be a runaway multi-line // string starting on line 4)
> > (Missing operator before HEAD?)
> > Scalar found where operator expected at /home/httpd/perl/test.html line 7,
> > at end of line
> > (Missing operator before ?)
> > [Sat Aug  5 16:10:07 2000] [error] syntax error at
> > /home/httpd/perl/test.html line 2, near "HEAD"
> > 
> > What did I miss?
> > 
> > Running embpexec.pl works fine on the same file I am running through
> > apache.
> > 
> > Thanks,
> > Jeff
> > 
> > 
> > 
> 
> -- 
> Jason Bodnar
> [EMAIL PROTECTED]
> 




RE: Help Embperl

2000-08-05 Thread Jason Bodnar

Please send the file for the url you're getting the error with.

On 05-Aug-2000 Jeff Smelser wrote:
> I got EMbperl to compile. It when I did make test, everything went great.
> OK's down the line. I set up apache with:
> 
> 
> SetHandler perl-script
> PerlHandler HTML::Embperl
> 
> 
> This is what apache says when I restarted it:
> 
> [10843]ERR:  25: Line 1: Error 
> [Sat Aug  5 16:10:00 2000] [notice] Apache/1.3.9 (Unix)  (Red Hat/Linux)
> mod_perl/1.21 configured -- resuming normal operations
> 
> This is what it says when I test is with test.html: 
> 
> Bareword found where operator expected at /home/httpd/perl/test.html line
> 3, near "Jeff's"
> (Missing operator before Jeff's?)
> Bareword found where operator expected at /home/httpd/perl/test.html line
> 5, near "/TITLE>
>(Might be a runaway multi-line // string starting on line 4)
> (Missing operator before HEAD?)
> Scalar found where operator expected at /home/httpd/perl/test.html line 7,
> at end of line
> (Missing operator before ?)
> [Sat Aug  5 16:10:07 2000] [error] syntax error at
> /home/httpd/perl/test.html line 2, near "HEAD"
> 
> What did I miss?
> 
> Running embpexec.pl works fine on the same file I am running through
> apache.
> 
> Thanks,
> Jeff
> 
> 
> 

-- 
Jason Bodnar
[EMAIL PROTECTED]



Help Embperl

2000-08-05 Thread Jeff Smelser

I got EMbperl to compile. It when I did make test, everything went great.
OK's down the line. I set up apache with:


SetHandler perl-script
PerlHandler HTML::Embperl


This is what apache says when I restarted it:

[10843]ERR:  25: Line 1: Error 
[Sat Aug  5 16:10:00 2000] [notice] Apache/1.3.9 (Unix)  (Red Hat/Linux)
mod_perl/1.21 configured -- resuming normal operations

This is what it says when I test is with test.html: 

Bareword found where operator expected at /home/httpd/perl/test.html line
3, near "Jeff's"
(Missing operator before Jeff's?)
Bareword found where operator expected at /home/httpd/perl/test.html line
5, near "/TITLE>



Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-08-03 Thread Malcolm Beattie

Paul J. Lucas writes:
> On Fri, 28 Jul 2000, Malcolm Beattie wrote:
> 
> > Assuming the kernel only keeps track of the last fault position in the file,
> > it won't recognise that it's being read linearly (twice :-) and may well not
> > do the async read ahead and drop behind in page cache that it would do
> > otherwise. Once again, you'll lose performance with mmap.
> 
>   And reading in the file twice into two separate I/O buffers
>   is better?

I've forgotten exactly what the original situation was so I'm not
sure whether it's better or not. With mmap you also have the
potential disadvantage that you're taking a page fault into the
kernel for every single page (say 4k or 8k) whereas with read(),
a single system call will fill up a much larger buffer with data.
It's also possible that the kernel can play tricks to get you the
data from a read better (on some architectures it could avoid
copying through the cache or it may be able to get the data
transferred from the source directly into your buffer without
passing through the CPU or suchlike).

Basically, mmap may well be an advantage from the ease or
elegance-of-coding point of view and in some cases it may win out
over read() for performance/scalability or whatever but it's not a
foregone conclusion and there are kernel/architecture-specific
difference which may swing the balance one way or the other. Now
we're getting offtopic though.

I really just wanted to make the points that saying "mmap is
always better than read" is not true and that there are things
going on behind the scenes.

--Malcolm

-- 
Malcolm Beattie <[EMAIL PROTECTED]>  I am looking for a Linux (and
Unix Systems Programmer  maybe Apache/mod_perl) job/contract
Oxford University Computing Services   http://users.ox.ac.uk/~mbeattie/cv.html



Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Paul J. Lucas

On Fri, 28 Jul 2000, Malcolm Beattie wrote:

> Assuming the kernel only keeps track of the last fault position in the file,
> it won't recognise that it's being read linearly (twice :-) and may well not
> do the async read ahead and drop behind in page cache that it would do
> otherwise. Once again, you'll lose performance with mmap.

And reading in the file twice into two separate I/O buffers
is better?

- Paul




Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Malcolm Beattie

Paul J. Lucas writes:
> > This is the quote from "Philip and Alex..." that I was talking about
> > earlier. I don't know if its relevant or not:
> > 
> > They replied "NaviServer uses memory-mapped file I/O on single-processor
> > machines but automatically configures itself to use operating system read on
> > multi-CPU machines so as to reduce shared memory contention."
> 
>   mmap(2) is *supposed* to share memory when read-only which is
>   what's beign done for HTML file reads, so I don't understand
>   what "contention" there could possibly be.

That's where some of the subtlety comes in. The first that springs
to mind is that with multiple CPUs of an architecture with a
virtually indexed cache, if the mmap maps the file at different
virtual addresses (as it very well may without slow global
communication between the reading processes) then the data will end
up being duplicated in processor cache. That slows things down.

Another point is that it can be harder for the kernel to notice
when a file is being read linearly when all it sees is page faults
through an address space. That means it may not do read-ahead on
that file as well. Most decent Unices will probably try to keep
track these days (certainly Linux does page-ahead and in fact
page-around to try to predict when to read-ahead or drop-behind
or whatever). On the other hand, if you have two concurrent
processes doing the reading then you'll get page faults at, for
example, byte 8k, 16k, 8k(second process starting), 24k, 16k and
so on. Assuming the kernel only keeps track of the last fault
position in the file, it won't recognise that it's being read
linearly (twice :-) and may well not do the async read ahead and
drop behind in page cache that it would do otherwise. Once again,
you'll lose performance with mmap.

--Malcolm

-- 
Malcolm Beattie <[EMAIL PROTECTED]>
Unix Systems Programmer
Oxford University Computing Services



Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Matt Sergeant

On Fri, 28 Jul 2000, Paul J. Lucas wrote:

> > This is the quote from "Philip and Alex..." that I was talking about
> > earlier. I don't know if its relevant or not:
> > 
> > They replied "NaviServer uses memory-mapped file I/O on single-processor
> > machines but automatically configures itself to use operating system read on
> > multi-CPU machines so as to reduce shared memory contention."
> 
>   mmap(2) is *supposed* to share memory when read-only which is
>   what's beign done for HTML file reads, so I don't understand
>   what "contention" there could possibly be.
> 
>   Additionally, any OS that doesn't get mmap right is severly
>   broken and shouldn't be used.

Well Philip does recommend HPUX ;-)

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Paul J. Lucas

> This is the quote from "Philip and Alex..." that I was talking about
> earlier. I don't know if its relevant or not:
> 
> They replied "NaviServer uses memory-mapped file I/O on single-processor
> machines but automatically configures itself to use operating system read on
> multi-CPU machines so as to reduce shared memory contention."

mmap(2) is *supposed* to share memory when read-only which is
what's beign done for HTML file reads, so I don't understand
what "contention" there could possibly be.

Additionally, any OS that doesn't get mmap right is severly
broken and shouldn't be used.

- Paul




Re: [OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Matt Sergeant

On Fri, 28 Jul 2000, Paul J. Lucas wrote:

> On Fri, 28 Jul 2000, Kenneth Lee wrote:
> 
> > it would be good for the user to choose between mmap or normal i/o at 
> > compile time. i'll try HTML::Tree anyway in the meantime.
> 
>   It's not that simple.  Using mmap(2) greatly affects how one
>   writes code: it's not a drop-in replacement for standard I/O.
>   An mmap'd file *becomes* memory in the time it takes the OS to
>   handle a page-fault.  You then further get speed by accessing
>   the file *as* memory via ordinary pointers rather than function
>   calls and I/O buffers.  Inside the HTML Tree code is a generic
>   C++ STL-style container class wrapped around mmap...quite nice
>   if I do say so myself.
> 
>   By definition, file I/O off disk can't be faster than mmap(2).

This is the quote from "Philip and Alex..." that I was talking about
earlier. I don't know if its relevant or not:

>>
My favorite AOLserver story starts in the seventh-floor lounge of the MIT
Artificial Intelligence Laboratory. I was asking Robert Thau, primary
author of the Apache server program, why the Netscape 1.1 server was so
slow. He said "Oh that's because those guys don't understand Unix.
They're actually using the read system call to read files." Everyone in
the room laughed except me. What? What's wrong with that? I asked. He
replied, "Everyone knows you can't use read; you have to use memory-mapped
I/O." 
  I knew that the NaviSoft guys were about to release a new version so I
thought I'd give the naifs in Santa Barbara the benefit of some hard-core
MIT engineering knowledge. I told them the story and asked them what
NaviServer, as it was then called, did. They replied "NaviServer uses
memory-mapped file I/O on single-processor machines but automatically
configures itself to use operating system read on multi-CPU machines so
as to reduce shared memory contention."
<<

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




[OT]: mmap (Was: Templating System (preview Embperl 2.0))

2000-07-28 Thread Paul J. Lucas

On Fri, 28 Jul 2000, Kenneth Lee wrote:

> it would be good for the user to choose between mmap or normal i/o at 
> compile time. i'll try HTML::Tree anyway in the meantime.

It's not that simple.  Using mmap(2) greatly affects how one
writes code: it's not a drop-in replacement for standard I/O.
An mmap'd file *becomes* memory in the time it takes the OS to
handle a page-fault.  You then further get speed by accessing
the file *as* memory via ordinary pointers rather than function
calls and I/O buffers.  Inside the HTML Tree code is a generic
C++ STL-style container class wrapped around mmap...quite nice
if I do say so myself.

By definition, file I/O off disk can't be faster than mmap(2).

- Paul




Re: Templating System (preview Embperl 2.0)

2000-07-28 Thread Kenneth Lee

it would be good for the user to choose between mmap or normal i/o at 
compile time. i'll try HTML::Tree anyway in the meantime.


Matt Sergeant wrote:
> 
> On Thu, 27 Jul 2000, Paul J. Lucas wrote:
> 
> > On Thu, 27 Jul 2000, Gerald Richter wrote:
> >
> > > To keep it fast Embperl is written in C.
> >
> >   Unless you use mmap(2), you can't compete with the speed of
> >   HTML Tree.  The only downside of mmap(2) is that HTML Tree must
> >   be first in an Apache::Filter filter chain.
> 
> I've heard that mmap is only faster on single processor systems. On a dual
> or above system you don't want to use memory mapped IO. (This was,
> admittedly, from Phillip and Alex's guide to web publishing).
> 
> Besides, I agree with Gerald, that reading in the template is a tiny
> portion of the overall problem. You may benchmark reading in _and_ parsing
> the template all you like, but ultimately people's web serving bottlenecks
> are generally database access and network latency.



Re: Templating System (preview Embperl 2.0)

2000-07-28 Thread Gisle Aas

"Paul J. Lucas" <[EMAIL PROTECTED]> writes:

> On Fri, 28 Jul 2000, Gerald Richter wrote:
> 
> > As far as I understand you you use mmap to read in the source file, is this
> > correct?
> 
>   Yes.
> 
> > If this is true, then it will not make much difference, because reading in
> > the source is only a very small piece of all the time that it takes to
> > generate the output from a dynamic page.
> 
>   I suggest you do some benchmarks.  I have, albeit many months
>   ago.  If I recall correctly, I took Yahoo's home page and ran
>   it through my HTML Tree and that of Gisle Aas: HTML was about
>   7-8 times faster.

That does not show that mmap is superior.

I have not been able to build your module on my system, so I have not
been able to set up any benchmarks myself.  My guess is that you
compared your module parsing speed with that of the HTML::TreeBuilder
module?  Could you please be specific with what versions of the
modules you compared?  Perhaps also post the benchmark code you used.
Also tell me what HTML::Parser you had installed.  Did you use
HTML-Parser-3?

If your module is that much faster than the basic HTML::Parser then I
must be doing something very wrong.

> > My point was, that the C implementation of parsering and DOM tree
> > storage/caching, is much faster (uses much less memory) then doing the same
> > in Perl.
> 
>   ...and faster still with mmap(2).

I don't believe mmap buys you any significant.  And it has the
drawback that you can't parse from pipes or sockets.

I made this little test program.  I am not able to measure mmap to be
faster than fread on my system.  I am testing with Yahoo's home page.
Do you get different numbers?

Regards,
Gisle

--->8
#include 
#include 
#include 
#include 
#include 
#include 

void
with_mmap(char *file)
{
struct stat sbuf;
int fd;
void* area;
char* c;
int size;
unsigned int checksum;

fd = open(file, O_RDONLY);
fstat(fd, &sbuf);
size = sbuf.st_size;
area = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);

/* read the mapped area */
checksum = 0;
c = area;
while (size--) {
checksum += *c++;
}
munmap(area, sbuf.st_size);

printf("%s: sum=%x\n", file, checksum);
}

void
with_fread(char *file)
{
FILE* f = fopen(file, "r");
char buf[32*1024];
unsigned int checksum;
size_t n;

checksum = 0;
while ( (n = fread(buf, 1, sizeof(buf), f))) {
char *c = buf;
int n_orig = n;
while (n--)
checksum += *c++;
if (n_orig < sizeof(buf))
break;
}
fclose(f);

printf("%s: sum=%x\n", file, checksum);
}



int
main(int argc, char** argv)
{
int i;
void (*f)(char*);

if (argc <= 1) {
fprintf(stderr, "Missing type\n");
return -1;
}

if (strcmp(argv[1], "mmap") == 0)
f = with_mmap;
else if (strcmp(argv[1], "fread") == 0)
f = with_fread;
else {
fprintf(stderr, "Bad type '%s'\n", argv[1]);
return -1;
}

for (i = 2; i < argc; i++) {
f(argv[i]);
}
return 0;
}



RE: Templating System (preview Embperl 2.0)

2000-07-28 Thread Matt Sergeant

On Thu, 27 Jul 2000, Paul J. Lucas wrote:

> On Thu, 27 Jul 2000, Gerald Richter wrote:
> 
> > To keep it fast Embperl is written in C.
> 
>   Unless you use mmap(2), you can't compete with the speed of
>   HTML Tree.  The only downside of mmap(2) is that HTML Tree must
>   be first in an Apache::Filter filter chain.

I've heard that mmap is only faster on single processor systems. On a dual
or above system you don't want to use memory mapped IO. (This was,
admittedly, from Phillip and Alex's guide to web publishing).

Besides, I agree with Gerald, that reading in the template is a tiny
portion of the overall problem. You may benchmark reading in _and_ parsing
the template all you like, but ultimately people's web serving bottlenecks
are generally database access and network latency.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




RE: Templating System (preview Embperl 2.0)

2000-07-27 Thread Gerald Richter

>
>   I suggest you do some benchmarks.  I have, albeit many months
>   ago.  If I recall correctly, I took Yahoo's home page and ran
>   it through my HTML Tree and that of Gisle Aas: HTML was about
>   7-8 times faster.
>

I don't use Gisle Aas HTML Parser. Embperl has it's own. This parser maybe a
little slower then yours, because it's configuarble what it can parse. That
gives you very much flexibility with using custom html/xml tags. On the
otherside parsing is only done for the first request and then I keep the
parsed result. So if you do 1000 request to a page, the parser time only
counts on the first request. You may even do that parsing stuff at server
startup time (at least for often requested pages)


> > My point was, that the C implementation of parsering and DOM tree
> > storage/caching, is much faster (uses much less memory) then
> doing the same
> > in Perl.
>
>   ...and faster still with mmap(2).
>
I have already keeped that information in my mind (and in my bookmark list
:-). There is always something that could be done faster and Embperl 2.0 is
just starting and I know that there is more potential to optimze it.

Anyway, thanks for the hint with mmap. Maybe if I had knew about your parser
before, I had used it instead of creating my own one.

Gerald




RE: Templating System (preview Embperl 2.0)

2000-07-27 Thread Paul J. Lucas

On Fri, 28 Jul 2000, Gerald Richter wrote:

> As far as I understand you you use mmap to read in the source file, is this
> correct?

Yes.

> If this is true, then it will not make much difference, because reading in
> the source is only a very small piece of all the time that it takes to
> generate the output from a dynamic page.

I suggest you do some benchmarks.  I have, albeit many months
ago.  If I recall correctly, I took Yahoo's home page and ran
it through my HTML Tree and that of Gisle Aas: HTML was about
7-8 times faster.

> My point was, that the C implementation of parsering and DOM tree
> storage/caching, is much faster (uses much less memory) then doing the same
> in Perl.

...and faster still with mmap(2).

- Paul




RE: Templating System (preview Embperl 2.0)

2000-07-27 Thread Gerald Richter

>
> > To keep it fast Embperl is written in C.
>
>   Unless you use mmap(2), you can't compete with the speed of
>   HTML Tree.  The only downside of mmap(2) is that HTML Tree must
>   be first in an Apache::Filter filter chain.
>

As far as I understand you you use mmap to read in the source file, is this
correct?

If this is true, then it will not make much difference, because reading in
the source is only a very small piece of all the time that it takes to
generate the output from a dynamic page. But I never said Embperl is the
fastest modules of all and I didn't have taken a closer look to HTML Tree.
So maybe HTML Tree is faster, but from the decription in the thread it does
not have all the functionalty that Embperl 2 have/will have (of course HTML
Tree will develop also).

My point was, that the C implementation of parsering and DOM tree
storage/caching, is much faster (uses much less memory) then doing the same
in Perl.

Gerald

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

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




RE: Templating System (preview Embperl 2.0)

2000-07-27 Thread Gerald Richter

> 
> You can do exactly this with the Template Toolkit. There's an option
> to enable embedded perl, should you wish to do so and if the DBI
> plugin isn't good enough for you.
> 
> I hate to see lots of IF type clauses in a page. Iterating over result
> sets - Good. Doing programming logic in something that's supposed to
> be a displat template - Bad.
> 

To quote you: "You can do exactly this with the Embperl." :-)

Gerald





Re: Templating System (preview Embperl 2.0)

2000-07-27 Thread ___cliff rayman___

is this a gauntlet being thrown down?
i hear the sound of parsing engines grinding away:
gentleman - start your benchmarks.


--
___cliff [EMAIL PROTECTED]http://www.genwax.com/

"Paul J. Lucas" wrote:

> On Thu, 27 Jul 2000, Gerald Richter wrote:
>
> > To keep it fast Embperl is written in C.
>
> Unless you use mmap(2), you can't compete with the speed of
> HTML Tree.  The only downside of mmap(2) is that HTML Tree must
> be first in an Apache::Filter filter chain.
>
> - Paul







  1   2   3   4   5   6   7   >