Re: Application design patterns

2003-07-24 Thread Eric Sammer
Perrin Harkins wrote: There are tutorials on the Template Toolkit site, a recent perl.com article about TT and Class::DBI, and my article: http://perl.apache.org/docs/tutorials/apps/scale_etoys/etoys.html I read Perrin's case study awhile ago and it was excellent. Out of curiosity (and since most

[MP2] Placing Apache::RequestRec Apache::RequestIO APR::Tableuse statements in startup.pl

2003-07-24 Thread Jamie Krasnoo
Will placing Apache::RequestRec Apache::RequestIO APR::Table in startup.pl to load them up for multiple handlers have any bad side effects? I noticed that when I load them via startup.pl the handlers that use them don't complain that they don't have the use statements within the module code and

Re: [mp2] BEGIN blocks

2003-07-24 Thread Issac Goldstand
I'm not really sure what's going on... I tried making a test module to see what was going on inside, which appeared to function correctly. However, the real module is still having troubles. The database handle is opened ($dbh=DBI-connect...) in a BEGIN block in the real module, but the

Re: [MP2] Placing Apache::RequestRec Apache::RequestIO APR::Tableuse statements in startup.pl

2003-07-24 Thread Stas Bekman
Jamie Krasnoo wrote: Will placing Apache::RequestRec Apache::RequestIO APR::Table in startup.pl to load them up for multiple handlers have any bad side effects? I noticed that when I load them via startup.pl the handlers that use them don't complain that they don't have the use statements within

Re: [MP2] Placing Apache::RequestRec Apache::RequestIO APR::Table use statements in startup.pl

2003-07-24 Thread Jamie Krasnoo
On Thu, 2003-07-24 at 02:15, Stas Bekman wrote: Jamie Krasnoo wrote: Will placing Apache::RequestRec Apache::RequestIO APR::Table in startup.pl to load them up for multiple handlers have any bad side effects? I noticed that when I load them via startup.pl the handlers that use them

Re: [MP2] Placing Apache::RequestRec Apache::RequestIO APR::Tableuse statements in startup.pl

2003-07-24 Thread Issac Goldstand
It will work. Just be careful - if you distribute this module, the people who use it may not include these modules in their startup.pl, and if you discontinue usage of this module, you may end up with extra modules in memory which aren't needed. Issac - Original Message - From: Jamie

[mp1] Safe segfaults with mp1

2003-07-24 Thread Joel Palmius
This works, separate file /tmp/test.pl: use Safe; my($compartment) = new Safe; $compartment-permit(qw(:browse)); $compartment-reval(print \gnu\n\;); if($@) { die $@; } print \n\n; (Script prints gnu) This does not work, in perl-handler Handler.pm: [...] use Safe;

how to extend CPAN module?

2003-07-24 Thread ???? ????????
Hi, How to correctly extend CPAN module, perldoc only explains how to create CPAN module from scratch, but what about extending? I want to add some Foo::My.pm to existing Foo bundle. Which Makefile.PLs should patched? all? just one in subsdirectory 'mod'? Any link? Thx! -vlad

Re: [MP2] Placing Apache::RequestRec Apache::RequestIO APR::Tableuse statements in startup.pl

2003-07-24 Thread Stas Bekman
Jamie Krasnoo wrote: On Thu, 2003-07-24 at 02:15, Stas Bekman wrote: Jamie Krasnoo wrote: Will placing Apache::RequestRec Apache::RequestIO APR::Table in startup.pl to load them up for multiple handlers have any bad side effects? I noticed that when I load them via startup.pl the handlers that

Re: how to extend CPAN module?

2003-07-24 Thread Stas Bekman
wrote: Hi, How to correctly extend CPAN module, perldoc only explains how to create CPAN module from scratch, but what about extending? I want to add some Foo::My.pm to existing Foo bundle. Which Makefile.PLs should patched? all? just one in subsdirectory 'mod'? Any link? Please

Re: templating system opinions (axkit?)

2003-07-24 Thread Jean-Michel Hiver
I've been considering using a template system for an app that I'm working, but decided against it as the designers who would be putting the actual pages together (look n feel) use Adobe GoLive which does 'bad things' to non-html stuff (at least in my experience). I know everybody's defending

Re: Application design patterns

2003-07-24 Thread Aaron Ross
Hi Eric, class. What I'd like is to have my model (as in MVC) objects reuse the process or maybe even server shared objects without doing any of these: 1. Using a singleton utility class 2. Needing to pass objects to model objects' new() in teh controllers 3. Instantiating the objects in

Re: templating system opinions (axkit?)

2003-07-24 Thread Jean-Michel Hiver
I know everybody's defending their fave templating system... I guess I can't resist: I have to jump in and defend my baby :) So why is Petal better than anything else? Oops, I got a bit carried away... As a side note, Petal is probably not better than anything else, but different. If you're

Re: templating system opinions (axkit?)

2003-07-24 Thread Jeff AA
- Original Message - From: Jean-Michel Hiver [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 24, 2003 1:46 PM First of all, it is an implementation of TAL. TAL is a very clever open specification for WYSIWYG-friendly templates written by the Zope people. Do you have

Re: Application design patterns

2003-07-24 Thread Frank Wiles
On Thu, 24 Jul 2003 02:18:17 -0400 Eric Sammer [EMAIL PROTECTED] wrote: Perrin - Have you ever considered revealing more about the Etoys project or just the concepts as you applied them? It would be nice to peek at some of the details. Or, is this an NDA situation or some such thing? Either

Re: Application design patterns

2003-07-24 Thread Chris Winters
Frank Wiles wrote: I too would like to would like to have a better understanding of how MVC can be applied to mod_perl. Maybe even HelloWorld sized example showing how all of the different components interact? No examples, but Andy Wardley sent a great email to the Template Toolkit

RE: templating system opinions (axkit?)

2003-07-24 Thread Kitch, David
Do you have a URL for further reading on TAL? I found one: http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL Regards, Kitch

no_cache(1) and still cached?

2003-07-24 Thread Frank Maas
Hi, Recently I found some strange behaviour of the caching-functionality of Apache. I had configured one httpd as caching proxy and a second one creating the pages. Two kind of pages are created: dynamic ones (with no_cache(1)) and static ones (with an expiry set to some minutes or hours). What I

Re: Application design patterns

2003-07-24 Thread Stathy G. Touloumis
## NOTE : Very simple example which for the most part ## will seem like overkill and it is. Typically the complexity ## of the application can be reduced by breaking it into the ## components below. It makes for easier maintenance. ## Model responsible for data retrieval not formatting. ##In

Re: [mp1] Safe segfaults with mp1

2003-07-24 Thread Stas Bekman
Joel Palmius wrote: This works, separate file /tmp/test.pl: use Safe; my($compartment) = new Safe; $compartment-permit(qw(:browse)); $compartment-reval(print \gnu\n\;); if($@) { die $@; } print \n\n; (Script prints gnu) This does not work, in perl-handler Handler.pm:

Re: [mp1] Safe segfaults with mp1

2003-07-24 Thread Stas Bekman
Stas Bekman wrote: Joel Palmius wrote: use Safe; my($compartment) = new Safe; $compartment-permit(qw(:browse)); $compartment-reval(print \gnu\n\;); [...] Request results in segfault: [Thu Jul 24 12:59:56 2003] [notice] child pid 3003 exit signal Segmentation fault (11) [...]

RE: Templating system opinions (CGI::Application in connection with either HTML::Template or Template::Toolkit)

2003-07-24 Thread Jesse Erlbaum
Hey Randal -- Maybe because it competes with OpenInteract, which is far more established. I don't really think OI and CGI-App are in competition at all. OI attempts to be a uber-framework, a la Mason -- or maybe more like ColdFusion or WebObjects.CGI::Application just focuses on web

Re: [mp1] Safe segfaults with mp1

2003-07-24 Thread Joel Palmius
Ah, well, after a five hours of experimentation I thought up a working workaround anyway. This works with an unpatched version of mp1 ($substr is any perl code fetched from external source): my(@ops) = split(/\x0a/,$substr); my($cell,$reval); foreach $cell (@ops) {

Mixing Apache::Filter with other mods like mod_php

2003-07-24 Thread Crispin Bivans
Situation: I have a custom templating package that will lookup translation texts based off of keywords so we can use 1 html file for all 8-9 languages. I've made it part of an Apache::Filter list that also run's Apache::SSI so that any server side includes in the html file will also get run.

Re: templating system opinions (axkit?)

2003-07-24 Thread Jean-Michel Hiver
First of all, it is an implementation of TAL. TAL is a very clever open specification for WYSIWYG-friendly templates written by the Zope people. Do you have a URL for further reading on TAL? Yep. http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL Petal has an active community and a

Re: Mixing Apache::Filter with other mods like mod_php

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 12:48, Crispin Bivans wrote: Situation: I have a custom templating package that will lookup translation texts based off of keywords so we can use 1 html file for all 8-9 languages. I've made it part of an Apache::Filter list that also run's Apache::SSI so that any server

Re: no_cache(1) and still cached?

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 09:55, Frank Maas wrote: What I found was that sometimes users got served 'cached' dynamic pages. Although the server should not cache the page it looked like this happened whenever two requests were received at (nearly) the same time by the server. What happens if you

Re: Application design patterns

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 09:20, Frank Wiles wrote: I too would like to would like to have a better understanding of how MVC can be applied to mod_perl. Maybe even HelloWorld sized example showing how all of the different components interact? There's one of those in my original article.

Re: [MP2] Placing Apache::RequestRec Apache::RequestIO APR::Table use statements in startup.pl

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 04:32, Jamie Krasnoo wrote: Will placing Apache::RequestRec Apache::RequestIO APR::Table in startup.pl to load them up for multiple handlers have any bad side effects? I noticed that when I load them via startup.pl the handlers that use them don't complain that they

Re: Application design patterns

2003-07-24 Thread Eric Sammer
Aaron Ross wrote: Hi Eric, class. What I'd like is to have my model (as in MVC) objects reuse the process or maybe even server shared objects without doing any of these: 1. Using a singleton utility class 2. Needing to pass objects to model objects' new() in teh controllers 3. Instantiating the

Re: Application design patterns

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 02:18, Eric Sammer wrote: where did you (Perrin) keep objects like your database handle (assuming DBI, but please correct otherwise) and any objects that could be reused (TT, XML parser objects, et al)? People seem to ask about this frequently, but I don't think we

Advice sought for learning mod_perl (2 or 1)

2003-07-24 Thread Robert Lee
Hi everyone, I am new to Apache/mod_perl and everything else. I bought a fairly good book on Apache/mysql/mod_perl. Unfortunately, it is based on the Apache 1 server and mod_perl1. In doing so, it is using the Apache::Request module which has not been ported to mod_perl2 yet. Several

Re: Application design patterns

2003-07-24 Thread Eric Sammer
Perrin Harkins wrote: On Thu, 2003-07-24 at 02:18, Eric Sammer wrote: where did you (Perrin) keep objects like your database handle (assuming DBI, but please correct otherwise) and any objects that could be reused (TT, XML parser objects, et al)? People seem to ask about this frequently, but I

Re: Advice sought for learning mod_perl (2 or 1)

2003-07-24 Thread Ged Haywood
Hello there, On Thu, 24 Jul 2003, Robert Lee wrote: I am new to Apache/mod_perl and everything else. We're all still learning... I bought a fairly good book on Apache/mysql/mod_perl. There are others, see the mod_perl web site: http://perl.apache.org Unfortunately, it is based on the

Test unexpectedly succeeded during make test

2003-07-24 Thread Laus, Ryan J.
Hello everyone, Hopefully someone can help me out, I am having problems during the make test when trying to compile mod_perl-1.99_09. Even though a make install will work fine without any errors, I am not sure if it is a good idea to install if the make test fails. Here is my system background

reverse proxy in depth tutorial?

2003-07-24 Thread Garrett Goebel
Title: reverse proxy in depth tutorial? This is slightly off-topic, but as it hits on Mason, optimizing mod_perl for performance, and is covered in passing in the practical and mod_perl cookbook books, I figured I'd ask here first. Can anyone point me toward a good in depth article or

Re: Application design patterns

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 15:17, Eric Sammer wrote: Maybe a stupid question, but what would be the functional difference between dumping the object after each request like you say and using the same method as you describe for the TT object below? I ask because I'm currently treating both

RE: Mixing Apache::Filter with other mods like mod_php

2003-07-24 Thread Crispin Bivans
Thanks. I took the route of running a double pipe to a php command to send it the php text and read the results of it after processing. That was helpful. -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 8:57 AM To: Crispin Bivans

Re: Application design patterns

2003-07-24 Thread Garrett Goebel
Title: Re: Application design patterns Perrin Harkins wrote: The biggest thing the article didn't cover is the ideas used by the guys coding the more interactive parts of the application to express the state machine implemented by each of their modules in a declarative data structure.

Re: Application design patterns

2003-07-24 Thread Perrin Harkins
On Thu, 2003-07-24 at 17:22, Garrett Goebel wrote: Perrin Harkins wrote: The biggest thing the article didn't cover is the ideas used by the guys coding the more interactive parts of the application to express the state machine implemented by each of their modules in a declarative data

Re: Test unexpectedly succeeded during make test

2003-07-24 Thread Stas Bekman
First of all, when reporting problems please following the guidelines: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems OS: AIX 4.3.3 w/the latest maintenance level modperl/request_rec_tie_apiok 1/3 unexpectedly succeeded The test

Re: Advice sought for learning mod_perl (2 or 1)

2003-07-24 Thread Stas Bekman
Ged Haywood wrote: Q1: Is there a similar module to Apache::Request? Depends what you want to do, but not really. Care to try porting it? No no. Apache::Request 2 port is in works and it'll be available RSN thanks to Joe Schaefer and Randy Kobes who do an extraordinary job. Though it'll be

Re: [mp1] Safe segfaults with mp1

2003-07-24 Thread Stas Bekman
Joel Palmius wrote: Ah, well, after a five hours of experimentation I thought up a working workaround anyway. This works with an unpatched version of mp1 ($substr is any perl code fetched from external source): my(@ops) = split(/\x0a/,$substr); my($cell,$reval); foreach $cell

RE: mod_perl installation problem...

2003-07-24 Thread Randy Kobes
On Wed, 23 Jul 2003, Jim Morrison [Mailing-Lists] wrote: [ .. ] Make appeared to be successful yes (afaik)... I did wonder about the permissions thing but I tried as root to no avail.. Some people have had problems running the tests as root ... You might want to try unpacking, building, and

mp2: multiple include paths accross virtual servers?

2003-07-24 Thread Carl Brewer
I'm running into something that may be a feature(!) of my misunderstanding of how mp works. I've got this defined in a VirtualHost directive: PerlRequire /data/www/foo/secure/etc/startup.pl For a number of different virtual servers. Is it possible for mp2 (or mp in general) to keep state

Re: mp2: multiple include paths accross virtual servers?

2003-07-24 Thread Stas Bekman
Carl Brewer wrote: I'm running into something that may be a feature(!) of my misunderstanding of how mp works. I've got this defined in a VirtualHost directive: PerlRequire /data/www/foo/secure/etc/startup.pl For a number of different virtual servers. Is it possible for mp2 (or mp in general)