Embperl vs. Mason

2000-02-14 Thread Andre Landwehr

Hi,
I made some pages with Embperl, but I don't know Mason. Yesterday
a friend told me of Mason, but he does not know Embperl very
well. Now I wonder about the pros and cons of each, not only in
respect to performance but also general usability, bugs etc.
What do more experienced web programmers than I am think about
Embperl or Mason?
btw: Is the new EmbperlObject somewhat comparable to Mason's
component model?

Thanks for your comments,
Andre



RE: ANNOUNCE: HTML::Embperl 1.3b2

2000-02-14 Thread Gerald Richter


 Yes, that makes sense. Perhaps an optional argument for Execute that lists
 the variables to export?

yes, that's what I want to do

 Actually, there has to be a way to get variables
 in both directions. Perhaps an export list and an import list in the
 params to Execute?

one list should be enought, because this variables are actually shared in
every page, so whereever you change then doesn't matter. They are really
global.


 Yep. I'm kinda thinking of making templates easy to use for newbie
 engineers. Although specialized variables tend to duplicate things that
 are in other variables, they are useful for making things easier to use.

Yes, of course. I keep it in mind...


 I realized this, and I definitely like the way you did it. The only thing
 it doesn't give me is _per page_ "_top.html" files. If you see my example
 at the top, you see it looks for y/z_top.html first.

Aah, I thought this was a typo (and read it as y/z/_top.html)

 This functionality
 isn't supported in the path right now. Just a thought: What if the path
 somehow supported a prefix on filenames? Like if it was "y/z:y/:./", then
 you tack on the filename after each element in the path. The only problem
 is that this would require a trailing "/" on true directory names, but if
 you changed EmbperlObject to generate conforming paths it wouldn't be so
 much of a problem (I think).


Yes, we could add something like this.


 I really liked this "action" idea when I found out about it, as it solves
 multi-state responses to forms (error state, success state, etc.) very
 elegantly. Out of curiosity, what do you typically do for forms? An
 example might be a registration form where there are required fields. How
 does your page flow work?


For simple pages I have all (form/confirmation/sucess) in one page with just
an IF around. For more complex situations (such like wizards on Windows) I
have created an small framework which invokes the the correct page (based on
the POSTED form data), call functions to verify and keeps track of the data
between invocation (in hidden fields). I hope I can write some documatation
on it and release it as HTML::Embperl::Wizard. It works very well together
with EMbperlObject (for example see http://www.geoconfoman.unibe.ch/ and
click on Preregistration)


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: Embperl vs. Mason

2000-02-14 Thread Gerald Richter

Hi,
 I made some pages with Embperl, but I don't know Mason. Yesterday
 a friend told me of Mason, but he does not know Embperl very
 well. Now I wonder about the pros and cons of each, not only in
 respect to performance but also general usability, bugs etc.
 What do more experienced web programmers than I am think about
 Embperl or Mason?

Search the modperl mailinglist archive for discussions about that

 btw: Is the new EmbperlObject somewhat comparable to Mason's
 component model?


Embperl supports components since a long time (via Execute and [$ sub $]).
The EmbperlObject is a new way to put components together. If you want to
compare EmbperlObject you must compare it with Masons dhandler and
autohandler (see www.masonhq.com)

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: Embperl vs. Mason

2000-02-14 Thread Joshua Chamas

Andre Landwehr wrote:
 
 Hi,
 I made some pages with Embperl, but I don't know Mason. Yesterday
 a friend told me of Mason, but he does not know Embperl very
 well. Now I wonder about the pros and cons of each, not only in
 respect to performance but also general usability, bugs etc.
 What do more experienced web programmers than I am think about
 Embperl or Mason?
 btw: Is the new EmbperlObject somewhat comparable to Mason's
 component model?
 

Hi Andre,

I am unbiased in that I do not use either, but know about 
stuff like this since I wrote my own equivalent to these
web application environments, which will go unnamed ;)

Embperl seems to be more script centric, and Mason seems
more site centric, so mental approaches might differ
between top down vs. bottom up.  

I am not meaning to disparage either environment in creating 
these very rough generalizations, but I believe that their 
respective talents lie in these directions, such that you 
might find yourself better enabled creating particular scripts 
with Embperl, but in creating a master site of sites, Mason 
might make things better.

I can tell you that Embperl is much easier to get going, and 
has a very powerful set of objects to work with as well as a 
rich syntax.  But the Mason site architecture is very advanced, 
and promises other features like a great debugger and 
application publisher.

Also, Embperl is a bit faster on startup execution, but this
should not matter on a large complex site.  Both environments
provide expert modularization  caching methodologies with 
Mason's component architecture and Embperl's new object and
Execute() routine.

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Embedded Perl XML Extensions ...

2000-02-14 Thread Matt Sergeant

On Mon, 14 Feb 2000, Joshua Chamas wrote:
 XSLT seems to seriously complicate the XML rendering issue, and 
 perhaps unnecessarily?  Has it occurred to anyone that XSLT is just
 another programming language, and one that looks like an HTML doc?

There are those who hold that opinion. But because XSLT is a declarative
language, you can do far more in a few lines than you can with other
languages. Certainly when manipulating document nodes, anyway.

-- 
Matt/

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Cookies

2000-02-14 Thread Francesco Marsoni



Hello.
I'm trying to write an access handler for Apache - 
mod_perl
Inside the handler subI would like to send a 
cookie if the access is forbidden. But the following lines doesn't 
work:

$r-err_headers_out-add('Set-Cookie' 
= $cookie);return FORBIDDEN;

when FORBIDDEN is returned no cookie is sent. I 
found this way to send cookies with mod_perl somewhere in the web.
Does anyone know where's the problem? Or is there 
another way to send it?
Thx
Francesco


Re: Apache::ASP HTTP's validation model

2000-02-14 Thread Matt Sergeant

On Mon, 14 Feb 2000, Joshua Chamas wrote:
 Aaron Ross wrote:
  
  hi Dmitry!
  
   Wouldn't it be great it someone came up with a general solution for this...
  some kind of logical class from which you could inherit and implement the
  necessary methods.
  
   There was an interesting thread about this problem with Mason. I'm sure it's
  come up before with ASP. The mod_perl guide has a great section on it.. so
  what's missing for a mod_perl handler? what would it take to make a general
  solution... Well a general framework. Is that even possible?
  
 
 What if it were just an Apache routine, like the one I proposed 
 for Apache::ASP, $r-last_modified($time) ?  Certainly 
 someone could write up a module that defined Apache::last_module
 like Ken did with his Apache::Filter, it could be 
 Apache::LastModified.

Isn't this handled by meets_condition?

-- 
Matt/

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: emulating Basic Auth from Mason

2000-02-14 Thread Louis-David Mitterrand

On Sun, Feb 13, 2000 at 10:58:40AM -0800, Sean Chittenden wrote:
   I'm assuming that you're doing this in an access handler.  If
 that's the case, set up some condition in your module where it figures out
 whether or not the user is authenticated.  If the user isn't
 authenticated:
 
   return(AUTH_REQUIRED);
 
   That should do it.  I don't think that'll return the error page
 stating that you need access to continue, instead that should pass a
 header (I think two actually) to the browser signaling it to prompt the
 user.
   Another alternative would be to have the user redirected to a
 login page with good old fashion forms.  ;)  Good luck.  --SC

Yes this would be preferable, but I wanted to do this as a mod_perl
understanding exercise.

The required headers to trigger the browser login popup are:

$r-err_header_out('WWW-Authenticate', 'Basic realm="Base de données LNC"');
my ($res, $pw) = $r-get_basic_auth_pw;

and then check for $res and $pw to determine if the user has tried to login

   PS  If you're really interested in details of this, check out:
 
   http://www.modperl.com/book/chapters/ch6.html

Excellent reference, many thanks for your help!

-- 
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.aparima.com

  **  Hello and Welcome to the Psychiatric Hotline **
 If you are paranoid-delusional, we know who you are and what you want
   - just stay on the line so we can trace the call.



Re: Cookies

2000-02-14 Thread Axel Wagner

Hi,

I had the same problem the server not sending any cookies.
I don't think it has got to do with the 403 STATUS code:

My Code contains:
 
   # add cookie file to HTTP header
$r-err_headers_out-add('Set-Cookie' = $cookie);
$r-no_cache(1);
 
# trigger 403 ErrorDocument redirect
return
FORBIDDEN;   

My problem was that I tested my handler with the following URL in the
browser:

http://hostname/...

omitting the Domain that I previously set in the cookie.

Altering the URL to 

http://hostname.domain/...

does the trick for me.

Ciao

Axel



Re: Embperl vs. Mason

2000-02-14 Thread dreamwvr

hi,
  my ignorance on Embperl is about to show;-)) tell me 
what would one be looking at to write apps for say the 
casios and Pilot 5s in linux? will embedded perl work?
is it the right choice? this to map to web technologies 
of course:-))
   Regards,
  [EMAIL PROTECTED]



Re: Embperl vs. Mason

2000-02-14 Thread Jason Bodnar

 One big difference that I would point out is that despite its name
 HTML::Mason, is _much_ less HTML centric than Embperl.  It is a bit
 mod_perl centric but there is literally nothing HTML specific about it at
 all.  We've been talking recently about how to expand mason so that it can
 be used in any sort of context where you have a request (from STDIN,
 email, whatever) for content that you want filled by components.  From
 what I can tell, this is unlikely to be possible (or desirable?) with
 Embperl.

You are incorrect. HTML::Embperl is not HTML specific. It can be used just as
easily to process regular text files for anything from email to configuration
files. It does have HTML-specific features (such as dynamically generated
tables) but you don't have to use these if you are working with plain old text
files.

---
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

I strive for greatness but will settle for mediocrity. -- Jason Bodnar



Re: PerlChildInitHandler

2000-02-14 Thread Sean Chittenden

Check to make sure that you compiled in the Init and Exit handlers
into mod_perl.

If you include the following code in a script, you should be able
to figure this out really quick:

require mod_perl;
require mod_perl_hooks;
my @retval = qw(table);
my @list = mod_perl::hooks();
for my $hook (sort @list) {
my $on_off = 
  mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
}
push @retval, qw(/table);

print @retval;


Credit goes to Doug MacEachern on the code.  Stick that chunket of
code in a script and it should let you know what you have available and
what you don't.  ;)  --SC


On Mon, 14 Feb 2000, Brendan W. McAdams wrote:

 Date: Mon, 14 Feb 2000 12:02:45 -0500
 From: Brendan W. McAdams [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: PerlChildInitHandler
 
 I'm having trouble getting apache to even recognise the existance of
 PerlChildInitHandler ( and childexithandler it seems as well) .
 
 I've tried declaring my PerlChildInitHandler inside a VirtualHost, in the
 main body of the config, and as a push_handler in my startup file [which is,
 i know for a fact, being execed].
 
 no matter what I try, apache is compeltely ignoring this directive.
 I've put write to log when initialised traps in the modules that are being
 handled on init and they never trip.
 
 I've tried this with both Apache 1.39/modperl1.19 and Apache
 1.311/modperl1.21 and no luck
 Any assistance would be greatly appreciated.
 
 Brendan
 -
 Brendan W. McAdams|  email: [EMAIL PROTECTED]
 Programmer/Systems Administrator  | office: (305)377-2880
 Plexus InterActive| pager:  (305)277-4879
 http://www.plexmedia.com   | cell phone: (305)401-7313
 
 
 "Always listen to the experts - they'll tell you what can't be done and why.
 Then do it."
 -Robert A. Heinlein
 
 

-- 
Sean Chittenden
[EMAIL PROTECTED]
(408)530-0001



Re: PerlChildInitHandler

2000-02-14 Thread Brendan W. McAdams

Yup.
(I knew i did since i compiled with EVERYTHING=1).


All handlers lists  as Enabled when this script is run.

So ... whats the next step in debugging here?

-brendan
-
Brendan W. McAdams|  email: [EMAIL PROTECTED]
Programmer/Systems Administrator  | office: (305)377-2880
Plexus InterActive| pager:  (305)277-4879
http://www.plexmedia.com   | cell phone: (305)401-7313


"Always listen to the experts - they'll tell you what can't be done and why.
Then do it."
-Robert A. Heinlein
- Original Message -
From: "Sean Chittenden" [EMAIL PROTECTED]
To: "Brendan W. McAdams" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 14, 2000 12:17 PM
Subject: Re: PerlChildInitHandler


Check to make sure that you compiled in the Init and Exit handlers
into mod_perl.

If you include the following code in a script, you should be able
to figure this out really quick:

require mod_perl;
require mod_perl_hooks;
my @retval = qw(table);
my @list = mod_perl::hooks();
for my $hook (sort @list) {
my $on_off =
  mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
}
push @retval, qw(/table);

print @retval;


Credit goes to Doug MacEachern on the code.  Stick that chunket of
code in a script and it should let you know what you have available and
what you don't.  ;)  --SC


On Mon, 14 Feb 2000, Brendan W. McAdams wrote:

 Date: Mon, 14 Feb 2000 12:02:45 -0500
 From: Brendan W. McAdams [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: PerlChildInitHandler

 I'm having trouble getting apache to even recognise the existance of
 PerlChildInitHandler ( and childexithandler it seems as well) .

 I've tried declaring my PerlChildInitHandler inside a VirtualHost, in the
 main body of the config, and as a push_handler in my startup file [which
is,
 i know for a fact, being execed].

 no matter what I try, apache is compeltely ignoring this directive.
 I've put write to log when initialised traps in the modules that are being
 handled on init and they never trip.

 I've tried this with both Apache 1.39/modperl1.19 and Apache
 1.311/modperl1.21 and no luck
 Any assistance would be greatly appreciated.

 Brendan
 -
 Brendan W. McAdams|  email: [EMAIL PROTECTED]
 Programmer/Systems Administrator  | office: (305)377-2880
 Plexus InterActive| pager:  (305)277-4879
 http://www.plexmedia.com   | cell phone: (305)401-7313


 "Always listen to the experts - they'll tell you what can't be done and
why.
 Then do it."
 -Robert A. Heinlein



--
Sean Chittenden
[EMAIL PROTECTED]
(408)530-0001




Re: PerlChildInitHandler

2000-02-14 Thread Sean Chittenden

It's a bit harsh, but I'd try something like this just for kicks
to make sure I can get access to the requested Handler.

# In httpd.conf
PerlModule DieOnInit


# In DieOnInit package
package DieOnInit;

sub handler {
  warn "Child $$ is going to die in 20 seconds";
  sleep(20);  # Prevents children from constantly dying and filling up the
  # error logs
  die "Child dead: $$";
}

1;
#-- End package

I have a variation of this module lying around someplace that
provides me with a sanity check with regards to programming.  If the child
dies, then the code is executed and I can plop in my ___ number of lines
of code that weren't being executed earlier.  This kind of approach is
pretty top-down, but works when setting apache up... I've had a few
instances where the child _wasn't_ dying because of a config problem
farther up in the conf file.
At any rate, let me know if the handler isn't being executed... and
what you're trying to execute for that matter.  Could you use a
PerlRequire directive and place your init stuff in there?   --SC



On Mon, 14 Feb 2000, Brendan W. McAdams wrote:

 Date: Mon, 14 Feb 2000 12:25:30 -0500
 From: Brendan W. McAdams [EMAIL PROTECTED]
 To: Sean Chittenden [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: PerlChildInitHandler
 
 Yup.
 (I knew i did since i compiled with EVERYTHING=1).
 
 
 All handlers lists  as Enabled when this script is run.
 
 So ... whats the next step in debugging here?
 
 -brendan
 -
 Brendan W. McAdams|  email: [EMAIL PROTECTED]
 Programmer/Systems Administrator  | office: (305)377-2880
 Plexus InterActive| pager:  (305)277-4879
 http://www.plexmedia.com   | cell phone: (305)401-7313
 
 
 "Always listen to the experts - they'll tell you what can't be done and why.
 Then do it."
 -Robert A. Heinlein
 - Original Message -
 From: "Sean Chittenden" [EMAIL PROTECTED]
 To: "Brendan W. McAdams" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, February 14, 2000 12:17 PM
 Subject: Re: PerlChildInitHandler
 
 
 Check to make sure that you compiled in the Init and Exit handlers
 into mod_perl.
 
 If you include the following code in a script, you should be able
 to figure this out really quick:
 
 require mod_perl;
 require mod_perl_hooks;
 my @retval = qw(table);
 my @list = mod_perl::hooks();
 for my $hook (sort @list) {
 my $on_off =
   mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
 push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
 }
 push @retval, qw(/table);
 
 print @retval;
 
 
 Credit goes to Doug MacEachern on the code.  Stick that chunket of
 code in a script and it should let you know what you have available and
 what you don't.  ;)  --SC
 
 
 On Mon, 14 Feb 2000, Brendan W. McAdams wrote:
 
  Date: Mon, 14 Feb 2000 12:02:45 -0500
  From: Brendan W. McAdams [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: PerlChildInitHandler
 
  I'm having trouble getting apache to even recognise the existance of
  PerlChildInitHandler ( and childexithandler it seems as well) .
 
  I've tried declaring my PerlChildInitHandler inside a VirtualHost, in the
  main body of the config, and as a push_handler in my startup file [which
 is,
  i know for a fact, being execed].
 
  no matter what I try, apache is compeltely ignoring this directive.
  I've put write to log when initialised traps in the modules that are being
  handled on init and they never trip.
 
  I've tried this with both Apache 1.39/modperl1.19 and Apache
  1.311/modperl1.21 and no luck
  Any assistance would be greatly appreciated.
 
  Brendan
  -
  Brendan W. McAdams|  email: [EMAIL PROTECTED]
  Programmer/Systems Administrator  | office: (305)377-2880
  Plexus InterActive| pager:  (305)277-4879
  http://www.plexmedia.com   | cell phone: (305)401-7313
 
 
  "Always listen to the experts - they'll tell you what can't be done and
 why.
  Then do it."
  -Robert A. Heinlein
 
 
 
 --
 Sean Chittenden
 [EMAIL PROTECTED]
 (408)530-0001
 
 
 

-- 
Sean Chittenden
[EMAIL PROTECTED]
(408)530-0001



Re: PerlChildInitHandler

2000-02-14 Thread Randal L. Schwartz

 "Sean" == Sean Chittenden [EMAIL PROTECTED] writes:

Sean   Check to make sure that you compiled in the Init and Exit handlers
Sean into mod_perl.

Sean   If you include the following code in a script, you should be able
Sean to figure this out really quick:

Sean require mod_perl;
Sean require mod_perl_hooks;
Sean my @retval = qw(table);
Sean my @list = mod_perl::hooks();
Sean for my $hook (sort @list) {
Sean my $on_off = 
Sean   mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
Sean push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
Sean }
Sean push @retval, qw(/table);

Sean print @retval;

Ewww... Too many pushes. :)

require mod_perl;
require mod_perl_hooks;
print "table",
  (map {
"trtd", $_, "/tdtd",
(mod_perl::hook($_) ? "bEnabled/b" : "iDisabled/i"),
"/td/tr\n" } mod_perl::hooks()),
  "/table";

map is your friend.  Of course, this would have been even simpler with
CGI.pm HTML generators. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: PerlChildInitHandler

2000-02-14 Thread Sean Chittenden

Lol!  I ripped that right out of Apache::Status.  Any ideas as to
whether or not its faster with map or push?  I may, desire dependent,
benchmark the two formats and report the results.
It looks to me like the reason Doug did the code the way he did
was because he returns an array ref to the calling sub.  --SC


PS  CGI.pm does not reside on my system because of it's HTML
generation capabilities (and the consiquent memory bloat).  ;)

On 14 Feb 2000, Randal L. Schwartz wrote:

 Date: 14 Feb 2000 09:35:06 -0800
 From: Randal L. Schwartz [EMAIL PROTECTED]
 To: Sean Chittenden [EMAIL PROTECTED]
 Cc: Brendan W. McAdams [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: PerlChildInitHandler
 
  "Sean" == Sean Chittenden [EMAIL PROTECTED] writes:
 
 Sean Check to make sure that you compiled in the Init and Exit handlers
 Sean into mod_perl.
 
 Sean If you include the following code in a script, you should be able
 Sean to figure this out really quick:
 
 Sean require mod_perl;
 Sean require mod_perl_hooks;
 Sean my @retval = qw(table);
 Sean my @list = mod_perl::hooks();
 Sean for my $hook (sort @list) {
 Sean my $on_off = 
 Sean   mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
 Sean push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
 Sean }
 Sean push @retval, qw(/table);
 
 Sean print @retval;
 
 Ewww... Too many pushes. :)
 
 require mod_perl;
 require mod_perl_hooks;
 print "table",
   (map {
 "trtd", $_, "/tdtd",
 (mod_perl::hook($_) ? "bEnabled/b" : "iDisabled/i"),
 "/td/tr\n" } mod_perl::hooks()),
   "/table";
 
 map is your friend.  Of course, this would have been even simpler with
 CGI.pm HTML generators. :)
 
 

-- 
Sean Chittenden
[EMAIL PROTECTED]
(408)530-0001



Re: PerlChildInitHandler

2000-02-14 Thread Brendan W. McAdams

Nope.
I'm not seeing it initialised.
nothing in my logs...

I _COULD_ do it in startup but it would defeat purpose.

I'm building persistant database connections with mySQL and Apache::DBI
from everything I've read and deduced, optimally EACH CHILD should be
opening a localised persistant database connection (and leaving any scripts
run under the child to have access to $dbh database handler)
To do this I need the $DBH to be opened, or at the least, initialised, when
the Child starts up.

Consequently, I really need to get the ChildInitHandlers working =)

-brendan

-
Brendan W. McAdams|  email: [EMAIL PROTECTED]
Programmer/Systems Administrator  | office: (305)377-2880
Plexus InterActive| pager:  (305)277-4879
http://www.plexmedia.com   | cell phone: (305)401-7313


"Always listen to the experts - they'll tell you what can't be done and why.
Then do it."
-Robert A. Heinlein
- Original Message -
From: "Sean Chittenden" [EMAIL PROTECTED]
To: "Brendan W. McAdams" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, February 14, 2000 12:33 PM
Subject: Re: PerlChildInitHandler


It's a bit harsh, but I'd try something like this just for kicks
to make sure I can get access to the requested Handler.

# In httpd.conf
PerlModule DieOnInit


# In DieOnInit package
package DieOnInit;

sub handler {
  warn "Child $$ is going to die in 20 seconds";
  sleep(20);  # Prevents children from constantly dying and filling up the
  # error logs
  die "Child dead: $$";
}

1;
#-- End package

I have a variation of this module lying around someplace that
provides me with a sanity check with regards to programming.  If the child
dies, then the code is executed and I can plop in my ___ number of lines
of code that weren't being executed earlier.  This kind of approach is
pretty top-down, but works when setting apache up... I've had a few
instances where the child _wasn't_ dying because of a config problem
farther up in the conf file.
At any rate, let me know if the handler isn't being executed... and
what you're trying to execute for that matter.  Could you use a
PerlRequire directive and place your init stuff in there?   --SC



On Mon, 14 Feb 2000, Brendan W. McAdams wrote:

 Date: Mon, 14 Feb 2000 12:25:30 -0500
 From: Brendan W. McAdams [EMAIL PROTECTED]
 To: Sean Chittenden [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: PerlChildInitHandler

 Yup.
 (I knew i did since i compiled with EVERYTHING=1).


 All handlers lists  as Enabled when this script is run.

 So ... whats the next step in debugging here?

 -brendan
 -
 Brendan W. McAdams|  email: [EMAIL PROTECTED]
 Programmer/Systems Administrator  | office: (305)377-2880
 Plexus InterActive| pager:  (305)277-4879
 http://www.plexmedia.com   | cell phone: (305)401-7313


 "Always listen to the experts - they'll tell you what can't be done and
why.
 Then do it."
 -Robert A. Heinlein
 - Original Message -
 From: "Sean Chittenden" [EMAIL PROTECTED]
 To: "Brendan W. McAdams" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, February 14, 2000 12:17 PM
 Subject: Re: PerlChildInitHandler


 Check to make sure that you compiled in the Init and Exit handlers
 into mod_perl.

 If you include the following code in a script, you should be able
 to figure this out really quick:

 require mod_perl;
 require mod_perl_hooks;
 my @retval = qw(table);
 my @list = mod_perl::hooks();
 for my $hook (sort @list) {
 my $on_off =
   mod_perl::hook($hook) ? "bEnabled/b" : "iDisabled/i";
 push @retval, "trtd$hook/tdtd$on_off/td/tr\n";
 }
 push @retval, qw(/table);

 print @retval;


 Credit goes to Doug MacEachern on the code.  Stick that chunket of
 code in a script and it should let you know what you have available and
 what you don't.  ;)  --SC


 On Mon, 14 Feb 2000, Brendan W. McAdams wrote:

  Date: Mon, 14 Feb 2000 12:02:45 -0500
  From: Brendan W. McAdams [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: PerlChildInitHandler
 
  I'm having trouble getting apache to even recognise the existance of
  PerlChildInitHandler ( and childexithandler it seems as well) .
 
  I've tried declaring my PerlChildInitHandler inside a VirtualHost, in
the
  main body of the config, and as a push_handler in my startup file [which
 is,
  i know for a fact, being execed].
 
  no matter what I try, apache is compeltely ignoring this directive.
  I've put write to log when initialised traps in the modules that are
being
  handled on init and they never trip.
 
  I've tried this with both Apache 1.39/modperl1.19 and Apache
  1.311/modperl1.21 and no luck
  Any assistance would be greatly appreciated.
 
  Brendan
  -
  Brendan W. McAdams|  email: [EMAIL PROTECTED]
  Programmer/Systems Administrator  | office: (305)377-2880
  Plexus InterActive  

Re: PerlChildInitHandler

2000-02-14 Thread Randal L. Schwartz

 "Sean" == Sean Chittenden [EMAIL PROTECTED] writes:

Sean   Lol!  I ripped that right out of Apache::Status.  Any ideas as to
Sean whether or not its faster with map or push?  I may, desire dependent,
Sean benchmark the two formats and report the results.
Sean   It looks to me like the reason Doug did the code the way he did
Sean was because he returns an array ref to the calling sub.  --SC

It's probably more of a style thing.  I like "map" because I had a lot
of practice with Lispy-stuff in my history.  Maybe doug prefers the
the other.  TIMTWOTDI.

As for the array ref, this is easy:

return ["table", (map ...), "/table"];

:-)


-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Apache::ASP HTTP's validation model

2000-02-14 Thread Dmitry Beransky

The immediate problem I see with this approach, is that 
$Response-LastModified() can only be called once per request.  Consider a 
situation when a single asp file has multiple includes and each include is 
generated from a separate datasource.  In this case, each include has to 
report back with its own last modification time.

Dmitry

At 11:41 PM 2/13/00, Joshua Chamas wrote:
\How about some API extension, like $Response-LastModified($time)
that would automatically check the incoming If-Modified-Since
incoming header, and if set, and the LastModified time is
less, than would automatically call a $Response-End() and
send the NOT_MODIFIED status?  There would also be a side affect
of sending a Last-Modified header if an If-Modified-Since was
not sent, or if Last-Modified is greater.



Re: Apache::ASP HTTP's validation model

2000-02-14 Thread Dmitry Beransky

But meets_condition is a file specific API and will not work for data 
coming from a database or a subrequest, etc.

Dmitry

At 01:08 AM 2/14/00, Matt Sergeant wrote:
Isn't this handled by meets_condition?

On Mon, 14 Feb 2000, Joshua Chamas wrote:
  What if it were just an Apache routine, like the one I proposed
  for Apache::ASP, $r-last_modified($time) ?  Certainly
  someone could write up a module that defined Apache::last_module
  like Ken did with his Apache::Filter, it could be
  Apache::LastModified.



Re: Apache::ASP HTTP's validation model

2000-02-14 Thread Joshua Chamas

Dmitry Beransky wrote:
 
 The immediate problem I see with this approach, is that
 $Response-LastModified() can only be called once per request.  Consider a
 situation when a single asp file has multiple includes and each include is
 generated from a separate datasource.  In this case, each include has to
 report back with its own last modification time.
 
 Dmitry
 

In this case, it seems that $Response-LastModified would only
be called once after the developer calculated from all the 
includes or other data sources what the real mtime was for
script in question.  What other API would be reasonable
in this case ?  

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Apache::ASP HTTP's validation model

2000-02-14 Thread Matt Sergeant

On Mon, 14 Feb 2000, Dmitry Beransky wrote:
 But meets_condition is a file specific API and will not work for data 
 coming from a database or a subrequest, etc.

I don't think there's anything file specific about meets_condition. Simply
call $r-update_mtime() with the time given in your data or subrequest, etc.

-- 
Matt/

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Dynamic pages and ASP solutions - Apache::ASP vs. ChiliSoft ASP

2000-02-14 Thread Tim Lu

Hello,

I am try to get a website up running on debian linux, apache web server, 
and postgresql database.  however, to create dynamic pages, i have been 
exploring embperl, mason, Apache::ASP, and chilisoft ASP but have been 
unable to determine which one solution would probably be most 
optimal.  could any knowledgeable programmers out there give me some 
suggestions?

thanks,

tim





Re: Dynamic pages and ASP solutions - Apache::ASP vs. ChiliSoft ASP

2000-02-14 Thread Joshua Chamas

Tim Lu wrote:
 
 Hello,
 
 I am try to get a website up running on debian linux, apache web server,
 and postgresql database.  however, to create dynamic pages, i have been
 exploring embperl, mason, Apache::ASP, and chilisoft ASP but have been
 unable to determine which one solution would probably be most
 optimal.  could any knowledgeable programmers out there give me some
 suggestions?
 

Between Embperl, Mason,  Apache::ASP, there are significant 
differences in the features and production styles, but you can't
lose any way you go, and there are significant user populations
using each.  They are all fundamentally embedded perl web production 
environments.

Between these + Chilisoft, you have the difference between
using perl vs. VBScript  open source vs. commercial and I don't 
think you will hear anything other than how wonderful perl is on 
this list ( its quite true ;)

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



Re: Embedded Perl XML Extensions ...

2000-02-14 Thread Leslie Mikesell

According to Joshua Chamas:
Will you be able to emulate the IIS/ASP 'transformNode'
method that renders html from xml and xsl components?

   http://www.sci.kun.nl/sigma/Persoonlijk/egonw/xslt/
 
 transformNode  XSLT are not on my short list of TODOs for
 Apache::ASP, though certainly one could be easily made 
 available when the other is too!  

It looks like the one above is usable if not complete.  I don't
think anything exactly follows the standard yet.  The idea would
be to get the calling syntax extablished and simple xsl documents
working. 

 However, transformNode is not an ASP method per se but a method 
 of one of Microsoft's COM XML objects. So far I have stayed away 
 from implementing Microsoft's COM objects like the BrowserCap, the 
 AdRotator, and the like, and if I did provided an the XML object, 
 I would be starting a general perl port of as many Microsoft COM 
 objects as I could do.

The difference here is that XSL transformations *should* follow
vendor-independent standards and I'd like to see it available
on as many platforms as possible.  A developer here was already
complaining about how the MS sdk for xml has MS-specific
extensions in all the examples. 

 What is on my short list is providing a developer interface
 for rendering XML to HTML.  Now I have looked at XSLT, and it is 
 pretty scary, even if supposedly necessary for some managing large 
 document sets.  Its purpose does seem a bit orthogonal to the ASP 
 style of interleaving code  content, with the first goal being 
 simplicity and power, and then maintainability with decomp through 
 includes and modules.

It is more geared toward separating data from presentation, although
in theory you can transform data to other data just as well.  I think
it will become extemely useful in cases where you have machine
generated data that can be extracted in xml format and you want
to present it a number of customized ways.

 XSLT seems to seriously complicate the XML rendering issue, and 
 perhaps unnecessarily?  Has it occurred to anyone that XSLT is just
 another programming language, and one that looks like an HTML doc?

Yes, that is exactly the point, aside from being platform and
vendor-independent.  Someone who wants to do HTML presentation
now has a language designed for that.  Plus using IE5, you
can push the work out to the browser an let it cache or update
the components separately.

 I'll likely wait this out a bit to see how it shapes up, and would 
 finally need an Apache::ASP user to require this functionality before 
 pursuing it further.  Leslie, are you that user ?

Our situation may be a lost cause.  The data in question (commodity
trading stuff) lives on an NT box that has a nice native interactive
interface but the web side has been done with a unix mod_perl wrapper
to get the speed (maybe 30 price pages a second at peak times) and
reliability we need.  However we provide custom views of this for
brokers and you can't just turn HTML coders loose on production
mod_perl scripts even if you only need a slightly different look.
So, we've added XML output to the NT server and started using XSL
for some of the new variations, so far running under apache jserv.
However since nearly everyone else here is an NT developer, the
push is to put it all in one box, which is probably going to mean
running IIS and MS-asp so we can sell something easier for other
people to manage.  However, since I haven't completely sold my
soul to the dark side (and we aren't sure yet how well it will
work...) I'd really like the xsl to be portable, and usable under
mod_perl.  I've had some problems with memory use running java
servlets, although I like the load-balancing feature in the
current apache jserv.

  Les Mikesell
   [EMAIL PROTECTED] 



Re: Embedded Perl XML Extensions ...

2000-02-14 Thread Clay

i dont know if this is totally relevant

but i have a small sample of a linux box w
modperl apache setup

and the modules for XML::Parser XML::DOMXML::XSL

to parse the dtd xml and xsl file into a readable html doc

and it works!

embedperl could be used but thats just another layer right now
;)


i have only spent the weekend on learning xml
and this way of parsing

and this seemed the easiest way of deploying

http://drfrog.fdns.net/perl/xmlxsl.pl?filename=clay





RE: Embperl vs. Mason

2000-02-14 Thread Autarch

On Mon, 14 Feb 2000, Gerald Richter wrote:

  all.  We've been talking recently about how to expand mason so that it can
  be used in any sort of context where you have a request (from STDIN,
  email, whatever) for content that you want filled by components.
 
 While you are talking, Embperl can already do this for over 3 years :-)

What we're talking about is coming up with a framework to provide this.
You can pretty much DIY with Mason right now but it would be nice to
formalize a lot of the mechanisms into separate classes and such.

 I think both Mason and Embperl (and Apache::ASP of course) are very
 powerfull and it's mainly a matter of style what you prefer.

I certainly wasn't trying to bash Embperl or anything else (though I
freely admit to preferring Mason).  If it seemed that way, allow me to
apologize.  It totally agree, it's largely a matter of style and perhaps
needing certain features more than others.


-dave


/*==
www.urth.org
We await the New Sun
==*/



re-tieing stdout to caputure subrequest output

2000-02-14 Thread Jason Bodnar

Last November somebody sent me some code that demonstrated how to re-tie stdout
in order to capture the output from subrequests.

I misplaced that email so if the person who sent it to me could resend it I'd
be forever greatful. Of course, if somebody who didn't send it to me knows how
to do it and would like to send it to me as well, I'd also be forever greatful
to that person.

Thanks.

---
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

I swear I'd forget my own head if it wasn't up my ass. -- Jason Bodnar



RE: Embperl vs. Mason

2000-02-14 Thread Pascal Eeftinck

At 15:17 14-2-2000 -0600, Autarch wrote:
On Mon, 14 Feb 2000, Gerald Richter wrote:

   all.  We've been talking recently about how to expand mason so that 
 it can
   be used in any sort of context where you have a request (from STDIN,
   email, whatever) for content that you want filled by components.
 
  While you are talking, Embperl can already do this for over 3 years :-)

What we're talking about is coming up with a framework to provide this.
You can pretty much DIY with Mason right now but it would be nice to
formalize a lot of the mechanisms into separate classes and such.

  I think both Mason and Embperl (and Apache::ASP of course) are very
  powerfull and it's mainly a matter of style what you prefer.

I certainly wasn't trying to bash Embperl or anything else (though I
freely admit to preferring Mason).  If it seemed that way, allow me to
apologize.  It totally agree, it's largely a matter of style and perhaps
needing certain features more than others.

I don't know anything about XML etc. I know that I wanted something to offer
me some sort of templates and embedded Perl - I got kind of desperate writing
everything in CGI's.

So I hunted down all these options, Like Embperl, ePerl, Apache::ASP,
and of course HTML::Mason. I tried them all (one of the great things about
Open Source software :), and I picked the one I liked best. Which, in the
end, turned out to be Mason. (For example, Embperl's syntax for embedding
Perl just doesn't agree with me ... perhaps because it looks too much like
you're embedding TCL in StoryServer).

If you really want to know what's best for you you'll have to try it all
yourself. I guess it varies per person as well, depending on skills and
needs. Some systems might offer more features, while others will give you
more control. It's what you want and need that matters, not what others
think you should use (although I'll wholehartedly recommend Mason to anyone
asking :) ... it's exactly because of people's needs that we have more than
one such system around.

Grtz,
Pascal
--
Pascal Eeftinck - arcade^planet.nl
UIN: 1923806  arcade^xs4all.nl - Perl is not a language, it's a way of life




re-tieing stdout to caputure subrequest output

2000-02-14 Thread Ken Williams

From _subrequests_?  I'm under the impression that this isn't possible, but if
it is I definitely want to know about it.  I'd use it for Apache::SSI and
Apache::Filter.

My understanding is that since subrequests don't necessarily use Perl's STDOUT
layer, you can't capture the output with tie().

See Apache::Filter for examples of how to capture the STDOUT from subservient
Perl routines' print() statements.


[EMAIL PROTECTED] (Jason Bodnar) wrote:
Last November somebody sent me some code that demonstrated how to
re-tie stdout in order to capture the output from subrequests.

I misplaced that email so if the person who sent it to me could resend
it I'd be forever greatful. Of course, if somebody who didn't send it
to me knows how to do it and would like to send it to me as well, I'd
also be forever greatful to that person.

Thanks.

---
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

I swear I'd forget my own head if it wasn't up my ass. -- Jason Bodnar


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




UN-Authenticating users?

2000-02-14 Thread John Walker

I'm writing some stuff with CGI under mod perl. The users have to
authenticate prior to even getting to the script... However, some of my
users have more than one login with separate privlidges... (provided by
the script). I want them to be able to log out and then log back in as
someone else, but I can't quite figure out how to "UN-Authenticate".
(DE-Authenticate?)

I'm using CGI.pm under Apache::Registry, so I don't have a nice $r
object to see if I could do something like $c-user = ""; which I'm
guessing would barf anyway.

I know they can just close their browsers, but I doubt "they" know this,
and its not too elegant anyway. (To say nothing of the dreaded M$
"remember password dialog.) 

I would welcome any ideas on the topic.

John



RE: Embperl vs. Mason

2000-02-14 Thread Gerald Richter


 Well, I haven't used Embperl but I've read the docs a bit and I have some
 idea of how it works.

 One big difference that I would point out is that despite its name
 HTML::Mason, is _much_ less HTML centric than Embperl.  It is a bit
 mod_perl centric but there is literally nothing HTML specific about it at
 all.  We've been talking recently about how to expand mason so that it can
 be used in any sort of context where you have a request (from STDIN,
 email, whatever) for content that you want filled by components.

While you are talking, Embperl can already do this for over 3 years :-)

 From
 what I can tell, this is unlikely to be possible (or desirable?) with
 Embperl.

 This means that learning Mason for your website could let you leverage
 this knowledge into creating a generic server, a command line filtering
 command set, or whatever.


As Jason already pointed out Embperl has a lot of features for HTML, but you
can use it for all sorts of textfiles. Embperl is highly configurable, if
you don't need/like a specific feature for a given problem, you can just
disable it. The idea of Embperl was to make life easy and to let Embperl
handle as much things as possible for you, but in some sitaution this don't
let you do the things like you want to do them, then you simply disable the
feature.

From my point of view Mason is much more web (site) centric then Embperl
(this doesn't mean you can't use it outside a webserver)

When Mason came up it's great plus was it componenet model. Embperl has
learned a lot from Mason (and as Jonathan told me when we meet in summer on
the Perl conference, also Mason learnt form Embperl :-) and now Embperl has
also a component model which is as powerfull as the Mason one. The only
piece that is really missing, is the output cacheing of sub components (but
this is only a matter of time).

I think both Mason and Embperl (and Apache::ASP of course) are very
powerfull and it's mainly a matter of style what you prefer.

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
-



Embperl configuration problem

2000-02-14 Thread Jasper Wong

Hi guys, I'm new to using Embperl and ran into a configuration  
problem which
I don't know how to fix. I really appreciate it if you could point  
me to the right
direction :)

Here's the setup: I've Apache 1.39 statically compiled with modperl 1.21
and Embperl 1.2.1.  I have some pure perl files (.pl) in directory  
/cgi-bin
and embperl files (.ehtml) in /, so the configuration looks something like
this:
...
...
Alias /cgi-bin/ "/abc/cgi-bin/"
Location /cgi-bin
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
/Location
Location /
SetHandler perl-script
PerlHandler HTML::Embperl
PerlSetEnv EMBPERL_FILESMATCH "\.ehtml"
Options ExecCGI
/Location
...
...

Here's the problem: this setup works fine for my embperl pages, but the
perl files (*.pl)  in /cgi-bin fail to run and return as text files  
to the web browser.
If I comment out the embperl section (comment out the whole Location /)
then the perl files in /cgi-bin work fine. What am I doing wrong?
Comments are greatly appreciated. Thanks in advance.

Best Regards,
Jasper

[EMAIL PROTECTED]



Apache, mod_perl and DBI

2000-02-14 Thread Adam Cassar

hello people

me again with the Apache::DBI and apache problems

the scenario - a very basic install of redhat 6.1

downloaded mod_perl 1.21
 apache-1.3.11

from cpan

Apache::DBI v0.87
DBI v1.13
DBD::mysql  v2.0218

using the default httpd.conf with mod_perl added as a module

I add the line at the end of the config
PerlModule Apache::DBI

the server refuses to start, no logs, no nothing. running strace on apache
shows that it crashes when it spawns the client and loads the DBI modules

any ideas?

-- 

Adam Cassar
Senior Web Developer
___
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia



Re: Embperl configuration problem

2000-02-14 Thread Cliff Rayman

Your root Location directives are overriding your cgi-bin Location.
You set your embperl to skip all files but the ehtml, but that means
it does nothing with the .pl files.

Try this instead for the root Location.

Location /
   FilesMatch "\.ehtml$"
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
   /Filesmatch
/Location

cliff rayman
genwax.com

Jasper Wong wrote:


 ...
 Alias /cgi-bin/ "/abc/cgi-bin/"
 Location /cgi-bin
 SetHandler perl-script
 PerlHandler Apache::Registry
 Options ExecCGI
 PerlSendHeader On
 /Location
 Location /
 SetHandler perl-script
 PerlHandler HTML::Embperl
 PerlSetEnv EMBPERL_FILESMATCH "\.ehtml"
 Options ExecCGI
 /Location
 ...
 ...

 Here's the problem: this setup works fine for my embperl pages, but the
 perl files (*.pl)  in /cgi-bin fail to run and return as text files
 to the web browser.
 If I comment out the embperl section (comment out the whole Location /)
 then the perl files in /cgi-bin work fine. What am I doing wrong?
 Comments are greatly appreciated. Thanks in advance.

 Best Regards,
 Jasper

 [EMAIL PROTECTED]



Access modPerl Api from CGI??

2000-02-14 Thread Serge Serge Barbosa Da Torre


Hi guys,

I find it easier to do quick dirty things with CGI without having to 
restart the server.
So I am wondering if it is possible to create/simulate an Apache request 
object so that I can go on developping my application with pure CGI,
and still call the various Apache modules which requires this object.
For instance I'd prefer use directy 
  $r-header_out() methods than print header (blah blah blah)

I will of course switch  completely to mod Perl when my application is
sufficiently hashed out..

Please help me as I am missing some insight on mod perl internals.
Thanks,

-- 
Serge Barbosa Da Torre  -  [EMAIL PROTECTED]

"It's not easy, being green."
-- Kermit the Frog



RE: Embperl configuration problem

2000-02-14 Thread Gerald Richter

...
 Alias /cgi-bin/ "/abc/cgi-bin/"
 Location /cgi-bin
   SetHandler perl-script
   PerlHandler Apache::Registry
   Options ExecCGI
   PerlSendHeader On
 /Location
 Location /
   SetHandler perl-script
   PerlHandler HTML::Embperl
   PerlSetEnv EMBPERL_FILESMATCH "\.ehtml"
   Options ExecCGI
 /Location
 ...
 ...

Move the /cgi-bin part after the / part, so it overwrites it and not vice
vera

Gerald



Re: Access modPerl Api from CGI??

2000-02-14 Thread Stas Bekman

 I find it easier to do quick dirty things with CGI without having to 
 restart the server.
 So I am wondering if it is possible to create/simulate an Apache request 
 object so that I can go on developping my application with pure CGI,
 and still call the various Apache modules which requires this object.
 For instance I'd prefer use directy 
   $r-header_out() methods than print header (blah blah blah)
 
 I will of course switch  completely to mod Perl when my application is
 sufficiently hashed out..
 
 Please help me as I am missing some insight on mod perl internals.
 Thanks,

RTFM'ing will save you much more time than when you try to reinvent the
wheel.

You want to look at Apache::PerlRun for dirty CGI scripts:
http://perl.apache.org/guide/porting.html#Apache_PerlRun_a_closer_look

You want to look at development process techniques to solve the server
restart problem: 
http://perl.apache.org/guide/porting.html#Reloading_Modules_and_Required_F

Hope this helps...

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: Embperl vs. Mason

2000-02-14 Thread Jonathan Swartz

Nothing really to add here, except that since this seems to be a FAQ,
perhaps Stas would be willing to add a section about it that we could
just point to whenever this question comes up? A non-partisan page with
a focus on similarities and links to each site would be ideal.

At 12:39 AM 2/14/00 -0800, Joshua Chamas wrote:
Hi Andre,

I am unbiased in that I do not use either, but know about 
stuff like this since I wrote my own equivalent to these
web application environments, which will go unnamed ;)

Embperl seems to be more script centric, and Mason seems
more site centric, so mental approaches might differ
between top down vs. bottom up.  

I am not meaning to disparage either environment in creating 
these very rough generalizations, but I believe that their 
respective talents lie in these directions, such that you 
might find yourself better enabled creating particular scripts 
with Embperl, but in creating a master site of sites, Mason 
might make things better.

I can tell you that Embperl is much easier to get going, and 
has a very powerful set of objects to work with as well as a 
rich syntax.  But the Mason site architecture is very advanced, 
and promises other features like a great debugger and 
application publisher.

Also, Embperl is a bit faster on startup execution, but this
should not matter on a large complex site.  Both environments
provide expert modularization  caching methodologies with 
Mason's component architecture and Embperl's new object and
Execute() routine.

-- Joshua
_
Joshua Chamas  Chamas Enterprises Inc.
NodeWorks  free web link monitoring  Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051
 



Re: Embperl vs. Mason

2000-02-14 Thread Stas Bekman

 Nothing really to add here, except that since this seems to be a FAQ,
 perhaps Stas would be willing to add a section about it that we could
 just point to whenever this question comes up? A non-partisan page with
 a focus on similarities and links to each site would be ideal.

Hmm, I hardly cope with the scope of information the guide tries to cover
already. I want to insert some more information that I've in my backlogs
and on TODO list and then to start working on reconstruction of the guide
toward easier navigation thru the available information. 

That's said, I definitely don't want to enlarge the scope even more at
this time. Therefore I think the best solution is to start a separate
document that does various comparisons Embperl vs. Mason, VB/ChilySoft vs. 
Apache::ASP etc. Having a section on each comparison sounds like a great
idea.

When the reconstruction of the guide will be started, one of the bricks
will be the comparisons chapter.

Meanwhile please prepare the document or part of it and post it to the
list for review and further upload to the perl.apache.org. Text or POD
formats should be used.

I understand that the review that Joshua has posted seems to be the
correct one. Am I right? 

Thank you.


___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com