Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Jeff Pang





> Why don't you try ActivePerl instead of cygwin ?
 
Is there any free version of ActivePerl£¿or how much should I pay for it?thanks.

- Original Message - 
From: Jason J. Czerak 
To: modperl@perl.apache.org 
Sent: Thursday, February 16, 2006 4:28 AM
Subject: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3
I have an application that is based on Apache::ASP. Apache::ASP requires Apache2::porting and Apache2::compat to be in the startup.pl.Everything is working very well. I some how got mod_perl to build and running with out a segfault. This is good. The issue is when startup.pl is called, either from the command line or within apache I get this error:[Wed Feb 15 13:47:49 2006] [error] Can't load '/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll' for module Apache2::ServerUtil: No such process at /usr/lib/perl5/5.8/cygwin/XSLoader.pm line 68.\n at /usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm line 30\nCompilation failed in require at /u01/startup.pl line 4.\nBEGIN failed--compilation aborted at /u01/startup.pl line 4.\nCompilation failed in require at (eval 2) line 1.\nSuggestions?I have also have this some what working on native Win32 install of perl/apache/mod_perl. but apache goes into some sort of loop, eating memory and a kill is required, but this is random and only after some load testing.



-- 
Jason Czerak ([EMAIL PROTECTED])





__This email transmission and any documents, files or previous emailmessages attached to it may contain information that is confidential orlegally privileged. If you are not the intended recipient or a personresponsible for delivering this transmission to the intended recipient,you are hereby notified that you must not read this transmission andthat any disclosure, copying, printing, distribution or use of thistransmission is strictly prohibited. If you have received this transmissionin error, please immediately notify the sender by telephone or return emailand delete the original transmission and its attachments without readingor saving in any manner.

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Tom Schindl
It's free ;-) http://www.activestate.com/

Tom

Jeff Pang wrote:
>> Why don't you try ActivePerl instead of cygwin ?
>  
> Is there any free version of ActivePerl£¿or how much should I pay for
> it?thanks.
> 
> - Original Message -
> *From:* Jason J. Czerak 
> *To:* modperl@perl.apache.org 
> *Sent:* Thursday, February 16, 2006 4:28 AM
> *Subject:* mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3
> 
> I have an application that is based on Apache::ASP. Apache::ASP
> requires Apache2::porting and Apache2::compat to be in the startup.pl.
> 
> Everything is working very well. I some how got mod_perl to build
> and running with out a segfault. This is good. The issue is when
> startup.pl is called, either from the command line or within apache
> I get this error:
> 
> [Wed Feb 15 13:47:49 2006] [error] Can't load
> 
> '/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll'
> for module Apache2::ServerUtil: No such process at
> /usr/lib/perl5/5.8/cygwin/XSLoader.pm line 68.\n at
> /usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm line
> 30\nCompilation failed in require at /u01/startup.pl line 4.\nBEGIN
> failed--compilation aborted at /u01/startup.pl line 4.\nCompilation
> failed in require at (eval 2) line 1.\n
> 
> Suggestions?
> 
> I have also have this some what working on native Win32 install of
> perl/apache/mod_perl. but apache goes into some sort of loop, eating
> memory and a kill is required, but this is random and only after
> some load testing.
> 
> -- 
> Jason Czerak ([EMAIL PROTECTED] )
> 
> 
> 
> 
> 
> 
> __
> This email transmission and any documents, files or previous email
> messages attached to it may contain information that is confidential or
> legally privileged. If you are not the intended recipient or a person
> responsible for delivering this transmission to the intended recipient,
> you are hereby notified that you must not read this transmission and
> that any disclosure, copying, printing, distribution or use of this
> transmission is strictly prohibited. If you have received this 
> transmission
> in error, please immediately notify the sender by telephone or return 
> email
> and delete the original transmission and its attachments without reading
> or saving in any manner.
> 
> 
> --
> Jeff Pang
> NetEase AntiSpam Team
> http://corp.netease.com
> 



A question for the newbies

2006-02-16 Thread Clinton Gormley
It seems to me that a lot of people new to mod_perl and to Perl have
joined this mailing list recently.

And this is during a period when popular opinion (amongst those who know
no better) seems to regard Perl as antiquated.

I'm delighted that new people are joining.

My question is, what prompted you? What made you choose Perl above
Java/.Net/Python/Ruby etc etc

Do you have experience of those languages? What appeals to you about
Perl? And how do you find your community experience/support compared to
the other languages you know?

clint




Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Mark Galbreath


A word of caution from personal experience here.
 
First, I love ActiveState' s stuff - I bought (out of my pocket) personal and pro licenses for Komodo 3.2 and 3.5.  I run ActivePerl 5.8 and ActivePython 2.4 on my Winblows and Linux boxes at home.  So what's the prob?
 
At the office, installing ActivePerl just annoyed the sysadmins because it didn't really break anything but I found myself in the position of begin able to take advantage of some pretty cool modules (like IO::ALL, e.g.) that have been upgraded or designed for 5.8 when the infrastructure remains at 5.6.  I didn't think of this (doh!) until I tried deploying a little app I wrote and found it wouldn't work.  Make sure your infrastructure will support your upgrade!
 
Second, and though way more serious for me but perhaps not for you, I did the same with ActivePython and it broke all the system utilities on my Red Hat Enterprise 4 workstation.  This really pissed off the sysadmins and raised flags with the Security folks.
 
Third, one of the linux support folks here told me they were not supporting ActiveState products because the company was in the process of dissolving or being bought or something that made service and support continuity questionable.  Can anybody confirm this?
 
Mark<-|->kraM>>> Tom Schindl <[EMAIL PROTECTED]> 16-Feb-06 09:20:29 AM >>>
It's free ;-) http://www.activestate.com/TomJeff Pang wrote:>> Why don't you try ActivePerl instead of cygwin ?>  > Is there any free version of ActivePerl£¿or how much should I pay for> it?thanks.> > - Original Message -> *From:* Jason J. Czerak > *To:* modperl@perl.apache.org > *Sent:* Thursday, February 16, 2006 4:28 AM> *Subject:* mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3> > I have an application that is based on Apache::ASP. Apache::ASP> requires Apache2::porting and Apache2::compat to be in the startup.pl.> > Everything is working very well. I some how got mod_perl to build> and running with out a segfault. This is good. The issue is when> startup.pl is called, either from the command line or within apache> I get this error:> > [Wed Feb 15 13:47:49 2006] [error] Can't load> '/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll'> for module Apache2::ServerUtil: No such process at> /usr/lib/perl5/5.8/cygwin/XSLoader.pm line 68.\n at> /usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm line> 30\nCompilation failed in require at /u01/startup.pl line 4.\nBEGIN> failed--compilation aborted at /u01/startup.pl line 4.\nCompilation> failed in require at (eval 2) line 1.\n> > Suggestions?> > I have also have this some what working on native Win32 install of> perl/apache/mod_perl. but apache goes into some sort of loop, eating> memory and a kill is required, but this is random and only after> some load testing.> > -- > Jason Czerak ([EMAIL PROTECTED] )> > > > > > > __> This email transmission and any documents, files or previous email> messages attached to it may contain information that is confidential or> legally privileged. If you are not the intended recipient or a person> responsible for delivering this transmission to the intended recipient,> you are hereby notified that you must not read this transmission and> that any disclosure, copying, printing, distribution or use of this> transmission is strictly prohibited. If you have received this transmission> in error, please immediately notify the sender by telephone or return email> and delete the original transmission and its attachments without reading> or saving in any manner.> > > --> Jeff Pang> NetEase AntiSpam Team> http://corp.netease.com> 


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Clinton Gormley

>  
> At the office, installing ActivePerl just annoyed the sysadmins
> because it didn't really break anything but I found myself in the
> position of begin able to take advantage of some pretty cool modules
> (like IO::ALL, e.g.) that have been upgraded or designed for 5.8 when
> the infrastructure remains at 5.6.  I didn't think of this (doh!)
> until I tried deploying a little app I wrote and found it wouldn't
> work.  Make sure your infrastructure will support your upgrade!

this isn't really activestate's fault - it's always an issue when
upgrading versions.
>  
> Third, one of the linux support folks here told me they were not
> supporting ActiveState products because the company was in the process
> of dissolving or being bought or something that made service and
> support continuity questionable.  Can anybody confirm this?

ActiveState has been sold to a VC firm but they have no intention of
shutting down.

Read more here : http://www.eweek.com/article2/0,1895,1920555,00.asp

clint



Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Geoffrey Young


Jonathan Vanasco wrote:
> There's no roadmap on perl.apach.org for project status /  milestones / etc
> 
> can any maintainers comment on httpd2.2 support plans?

there's no reason why mp2 shouldn't work with httpd 2.2 at the moment in
almost all respects.  in fact, the only thing that I can think of that will
not work is the auth provider mechanism, but there's a CPAN module for that,
too, so you should be good to go.

but that said, reporting back any specific breakage with mod_perl under 2.2
to the dev list would be helpful.

> 
> perhaps adding some sort of roadmap to the site too?

patches welcome :)

> 
> the documentation for existing features is plentiful - there's just 
> nothing i've been able to find on future plans for the project - and  I
> know you all have direction

since mp2 is almost completely compatible with httpd 2.2 I don't really
understand the question.  yeah, there are a few places where we should tie
in more tightly with 2.2 but those instances shouldn't really be holding
anyone back.  but I guess if pressed our future plans would be to keep on
supporting httpd as it evolves - that's always been the goal :)

--Geoff


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Tyler MacDonald
Mark Galbreath <[EMAIL PROTECTED]> wrote:
> At the office, installing ActivePerl just annoyed the sysadmins because it
> didn't really break anything but I found myself in the position of begin
> able to take advantage of some pretty cool modules (like IO::ALL, e.g.)
> that have been upgraded or designed for 5.8 when the infrastructure
> remains at 5.6.  I didn't think of this (doh!) until I tried deploying a
> little app I wrote and found it wouldn't work.  Make sure your
> infrastructure will support your upgrade!

I'm kind-of confused here... are you saying that activeperl 8xx
builds don't have the standard perl 5.8 modules?

> Third, one of the linux support folks here told me they were not
> supporting ActiveState products because the company was in the process of
> dissolving or being bought or something that made service and support
> continuity questionable.  Can anybody confirm this?

ActiveState has been sold:

http://www.eweek.com/article2/0,1895,1920555,00.asp

I work for Sophos, ActiveState is in the office upstairs from me and
from the looks of things they are still very hard at work and aren't going
anywhere soon. And when they do, it'll just be to another office. The IT
teams are working hard to make sure that neither ActiveState or Sophos'
services are interrupted while the pieces of infrastructure we have in
common are being divvied up. :)

- Tyler



Re: A question for the newbies

2006-02-16 Thread John ORourke
Well I'm more of an old-bie, but I've heard quite a few people recently 
(first hand) acknowledging that PHP (specifically) isn't really a 
'serious' contender for enterprise web apps.  (no flames please, I have 
no opinions!)


I've also noticed my favourite news site* defining 'LAMP' as "Linux, 
Apache, MySQL, PHP/Perl/Python", so we've certainly got the exposure.


John

* The Register

Clinton Gormley wrote:


It seems to me that a lot of people new to mod_perl and to Perl have
joined this mailing list recently.

And this is during a period when popular opinion (amongst those who know
no better) seems to regard Perl as antiquated.
 





Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Jason J. Czerak





Note what I left in this reply... I suppose I should of been more explicit in what I tried. AcriveState perl fails quicker then perl.org perl binaries that I found.


On Thu, 2006-02-16 at 10:43 +0800, Foo Ji-Haw wrote:

 


Why don't you try ActivePerl instead of cygwin ?



- Original Message - 




From: Jason J. Czerak 




To: modperl@perl.apache.org 




Sent: Thursday, February 16, 2006 4:28 AM




Subject: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3







.




I have also have this some what working on native Win32 install of perl/apache/mod_perl. but apache goes into some sort of loop, eating memory and a kill is required, but this is random and only after some load testing.





-- 
Jason Czerak ([EMAIL PROTECTED])




















-- 
Jason Czerak ([EMAIL PROTECTED])






__
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that you must not read this transmission and
that any disclosure, copying, printing, distribution or use of this
transmission is strictly prohibited. If you have received this transmission
in error, please immediately notify the sender by telephone or return email
and delete the original transmission and its attachments without reading
or saving in any manner.




Re: A question for the newbies

2006-02-16 Thread Arne Skjaerholt
I'm not exactly a newbie anymore, but I came to mod_perl by way of Perl
scripts for the shell. I'd already written some PHP, but when I learned
Perl I saw the error of my ways as it were and realized that PHP really
is quite the makeshift language and that developing in Perl was far more
comfortable (and better for my sanity =).

Also, once I understood what mod_perl was -really- about, I got all the
more excited as it opens up a host of possibilities not available in
PHP.

Arne
:wq



Re: A question for the newbies

2006-02-16 Thread Mark Galbreath


I've been developing apps for business, ecommerce, and government in Java for 6 years.  I developed Web sites with Perl 5.0 CGI in the mid-1990s but never much cared for it outside of its excellent string maniulation, being attracted to the pure OO languages. I spent the last 2 years developing in C# ASP.NET and PHP 5.0.  Why did I come back to Perl?
 
Not voluntarily.  Competition from foreign developers, mostly from India, and companies outsourcing to offshore companies, mostly in India and Indonesia, depressed contracting rates all along the DC - Boston tech corridor for Java programmers.  .NET has not been widely accepted as a replacement for Java or the installed base of VB 6.0 apps and so opportunities are sparse.  I came back to Perl because I was unemployed for 6 months and this was the only decent job (pay the mortgage, college tuition, eat) I could find.  Seems like I have come full-circle over 10 years.
 
Nevertheless, I was very, very happy to find that in those intervening 10 years, Perl became OO with 5.6 and the 5.6 debug version, 5.8.  My perl code is now rife with double colons and reference arrows.  I miss the reference dot notation of Java and other OO languages, however.  Why didn't Larry include that?  And the 'use v. require' issue seems silly to me.  Why not a simple 'import' statement?  And the accessor schema and issues of 'my v. our v. local' and package transparency seems hackneyed to me.  Perhaps 6.0 will address issues like these?  I haven't looked.
 
Depsite my criticisms, I found that my fears of having to go "backwards" to a procedural language were unfounded.  Like C++, you can write procedural code in perl, but you'll soon be replaced by H1-B contractors if you do.  :-)
 
Mark<-|->kraM
Perl does Reflection.>>> Clinton Gormley <[EMAIL PROTECTED]> 16-Feb-06 08:41:02 AM >>>
It seems to me that a lot of people new to mod_perl and to Perl havejoined this mailing list recently.And this is during a period when popular opinion (amongst those who knowno better) seems to regard Perl as antiquated.I'm delighted that new people are joining.My question is, what prompted you? What made you choose Perl aboveJava/.Net/Python/Ruby etc etcDo you have experience of those languages? What appeals to you aboutPerl? And how do you find your community experience/support compared tothe other languages you know?clint


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Mark Galbreath


No, I'm saying modules that have been upgraded to 8.7 may no longer work in a 5.6 envirnoment.  Mine didn't.
 
Way cool.  Where (geographically) ru?>>> Tyler MacDonald [EMAIL PROTECTED]> 16-Feb-06 08:56:17 AM >>
    I'm kind-of confused here... are you saying that activeperl 8xxbuilds don't have the standard perl 5.8 modules?    I work for Sophos, ActiveState is in the office upstairs from me andfrom the looks of things they are still very hard at work and aren't goinganywhere soon. And when they do, it'll just be to another office. The ITteams are working hard to make sure that neither ActiveState or Sophos'services are interrupted while the pieces of infrastructure we have incommon are being divvied up. :)        - Tyler


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Tyler MacDonald
Mark Galbreath <[EMAIL PROTECTED]> wrote:
> No, I'm saying modules that have been upgraded to 8.7 may no longer work
> in a 5.6 envirnoment.  Mine didn't.

Ahh. I'd upgrade to 5.8 in that case. ;-)

> Way cool.  Where (geographically) ru?

Vancouver, BC, Canada.

- Tyler


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Jason J. Czerak




Let me make this CLEAR please.

Activestate perl, or any other perl/mod_perl/Apache that I found for windows fails under any load with zero error messages in any of the log files.  I need to do some sort of trace or something to get any real info for you developers, this I know. But in the mean time I'm looking for a quick solution.  The problem with native perl/apache/mod_perl is that randomly something will hang and just eat up memory and about 30% cpu.  We did benchmark load testing and just are loading up the splash page over and over and over. Even at the rate of 4 requests per second, it will hand, it will take time, but it will hand... the exact same config on Solaris is perfect.

I'm sure it's something in Apache::ASP and the Apache2:proting / Apache2:compat modules that hosing things up.



On Thu, 2006-02-16 at 08:47 -0500, Mark Galbreath wrote:

A word of caution from personal experience here.


 


First, I love ActiveState' s stuff - I bought (out of my pocket) personal and pro licenses for Komodo 3.2 and 3.5.  I run ActivePerl 5.8 and ActivePython 2.4 on my Winblows and Linux boxes at home.  So what's the prob?


 


At the office, installing ActivePerl just annoyed the sysadmins because it didn't really break anything but I found myself in the position of begin able to take advantage of some pretty cool modules (like IO::ALL, e.g.) that have been upgraded or designed for 5.8 when the infrastructure remains at 5.6.  I didn't think of this (doh!) until I tried deploying a little app I wrote and found it wouldn't work.  Make sure your infrastructure will support your upgrade!


 


Second, and though way more serious for me but perhaps not for you, I did the same with ActivePython and it broke all the system utilities on my Red Hat Enterprise 4 workstation.  This really pissed off the sysadmins and raised flags with the Security folks.


 


Third, one of the linux support folks here told me they were not supporting ActiveState products because the company was in the process of dissolving or being bought or something that made service and support continuity questionable.  Can anybody confirm this?


 


Mark<-|->kraM

>>> Tom Schindl <[EMAIL PROTECTED]> 16-Feb-06 09:20:29 AM >>>



It's free ;-) http://www.activestate.com/

Tom

Jeff Pang wrote:
>> Why don't you try ActivePerl instead of cygwin ?
>  
> Is there any free version of ActivePerl£¿or how much should I pay for
> it?thanks.
> 
> - Original Message -
> *From:* Jason J. Czerak 
> *To:* modperl@perl.apache.org 
> *Sent:* Thursday, February 16, 2006 4:28 AM
> *Subject:* mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3
> 
> I have an application that is based on Apache::ASP. Apache::ASP
> requires Apache2::porting and Apache2::compat to be in the startup.pl.
> 
> Everything is working very well. I some how got mod_perl to build
> and running with out a segfault. This is good. The issue is when
> startup.pl is called, either from the command line or within apache
> I get this error:
> 
> [Wed Feb 15 13:47:49 2006] [error] Can't load
> '/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll'
> for module Apache2::ServerUtil: No such process at
> /usr/lib/perl5/5.8/cygwin/XSLoader.pm line 68.\n at
> /usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm line
> 30\nCompilation failed in require at /u01/startup.pl line 4.\nBEGIN
> failed--compilation aborted at /u01/startup.pl line 4.\nCompilation
> failed in require at (eval 2) line 1.\n
> 
> Suggestions?
> 
> I have also have this some what working on native Win32 install of
> perl/apache/mod_perl. but apache goes into some sort of loop, eating
> memory and a kill is required, but this is random and only after
> some load testing.
> 
> -- 
> Jason Czerak ([EMAIL PROTECTED] )
> 
> 
> 
> 
> 
> 
> __
> This email transmission and any documents, files or previous email
> messages attached to it may contain information that is confidential or
> legally privileged. If you are not the intended recipient or a person
> responsible for delivering this transmission to the intended recipient,
> you are hereby notified that you must not read this transmission and
> that any disclosure, copying, printing, distribution or use of this
> transmission is strictly prohibited. If you have received this transmission
> in error, please immediately notify the sender by telephone or return email
> and delete the origina

Re: A question for the newbies

2006-02-16 Thread RJ Herrick
I started learning Perl about two years ago, and prior to that hadn't 
done any programming since my two pascal classes in highschool, except 
for a smattering of dos scripting. I had been mucking around with 
various linux distros and was fishing for a good language to get back 
onboard with, and perl seemed like it would be both useful and 
convenient. Picked up the llama book and have been building my bestiary 
ever since.
I started using mod_perl when I set up an apache dev server for a 
project I was working on... it's since crashed, and I haven't actually 
run it since, but expect to be using it for the code I'm currently 
writing, so I figured it woudl be best to write with that in mind.
I can't compare the community experience between languages, but in 
general I've found everyone very helpful and enthusiastic- the cranks 
that do pop their heads up usually are missing some point, and once 
clonked over the head by a more sr member quickly duck back out of sight.


I think that makes me the newest newbie so far... so do I get a beanie 
or something?

RJ Herrick

Clinton Gormley wrote:


It seems to me that a lot of people new to mod_perl and to Perl have
joined this mailing list recently.

And this is during a period when popular opinion (amongst those who know
no better) seems to regard Perl as antiquated.

I'm delighted that new people are joining.

My question is, what prompted you? What made you choose Perl above
Java/.Net/Python/Ruby etc etc

Do you have experience of those languages? What appeals to you about
Perl? And how do you find your community experience/support compared to
the other languages you know?

clint
 



Re: A question for the newbies

2006-02-16 Thread Mark Galbreath


truly.  The only thing PHP ever had going for it as far as I can see is templating.  And the Perl Template Toolkit is way cooler than PHP's templating framework.
 
On the other hand, if you write OO PHP (available since version 5), it could develop into a robust scripting language.  But there are so many scrubs using it as paste who don't even know what a design pattern is, much less follow something as basic as MVC, that PHP will continue to have a poor reputation for a long time.
 
Mark<-|-
Perl does Reflection>>> Arne Skjaerholt <[EMAIL PROTECTED]> 16-Feb-06 10:11:17 AM >>>
I'm not exactly a newbie anymore, but I came to mod_perl by way of Perlscripts for the shell. I'd already written some PHP, but when I learnedPerl I saw the error of my ways as it were and realized that PHP reallyis quite the makeshift language and that developing in Perl was far morecomfortable (and better for my sanity =).Also, once I understood what mod_perl was -really- about, I got all themore excited as it opens up a host of possibilities not available inPHP.Arne:wq


RE: Reading post data from separate handlers

2006-02-16 Thread Gerald Richter
Hi,

> 
> I have a problem that hopefully somebody has encountered or 
> can point me in the right direction.
> 
> We use the latest embperl 1.xxx release on linux. I have 
> created a handler to do authentication before the embperl 
> handler is run. This new handler needs to read data from the 
> post each request. However once read is called on the Apache 
> object you cannot call it again. This in turns cripples 
> embperl because it no longer has the post data. Is there any 
> way to be able to read the post data from multiple handlers?
> 

Since you use Embperl 1, I guess you use Apache 1.3, where no filter chain
exists.

In this case you cannot read the postdata twice. You need to read the data
in your first handler and pass it over to Embperl.

Gerald


 
** Virus checked by BB-5000 Mailfilter ** 



2.02 make fails: cannot find -lperl

2006-02-16 Thread Tom Setka
  I am running Knoppix 3.7 from a CD, so can't modify
anything in /lib, /usr/lib, etc.  Apache 2.0.55 has
been installed on my PC's hard drive and is correctly
serving web pages.  There is 
/usr/lib/libperl.so.5.8, which is a link to
libperl.so.5.8.4 .  Is there a way to tweak the build
process to get this to work?  Is there a bug in
Makefile.PL?


[EMAIL PROTECTED] make
cd "src/modules/perl" && make
make[1]: Entering directory
`/mnt/hda1/Linux/mod_perl-2.0.2/src/modules/perl'
rm -f mod_perl.so
cc -shared -L/usr/local/lib \
 \ 
  [deleted irrelevant material]

  -L/usr/local/lib
/usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc
-lcrypt \
-o mod_perl.so
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make[1]: *** [mod_perl.so] Error 1
make[1]: Leaving directory
`/mnt/hda1/Linux/mod_perl-2.0.2/src/modules/perl'
make: *** [modperl_lib] Error 2
[EMAIL PROTECTED]

(

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Mark Galbreath


Excellent!  Coding perl (this makes content relevant) allow you to ski Whistler/Blackcomb?
>>> Tyler MacDonald <[EMAIL PROTECTED]> 16-Feb-06 09:56:51 AM >>>
Mark Galbreath <[EMAIL PROTECTED]> wrote:> No, I'm saying modules that have been upgraded to 8.7 may no longer work> in a 5.6 envirnoment.  Mine didn't.    Ahh. I'd upgrade to 5.8 in that case. ;-)> Way cool.  Where (geographically) ru?    Vancouver, BC, Canada.        - Tyler


Re: A question for the newbies

2006-02-16 Thread Boysenberry Payne
I guess I'm still considered a mod_perl / perl newbie.  I started 
learning perl 6 months
ago in anticipation of translating a CMS (Content Management System) I 
wrote in PHP.


I considered Python, and  C++ as alternatives.  C++ was over kill and 
would require
way too much development just to get going (why reinvent the wheel if I 
don't have to.)
Python, seemed too similar to PHP for my tastes.  I don't like being 
"forced" to use
someone else's coding conventions unless I know there are valid reasons 
for it.
With what I read about Python's white space issues, I thought it might 
be more

tedious, rather than easier to maintain my 50+ files of code.

Once I started looking into perl I was blown away.  Not only has perl 
been the "swiss
army knife" of system administration for well over 10 years, but 
mod_perl blows the

socks off of php.

So for my particular project I couldn't find a better solution.

I think the hardest part about learning perl (coming from developing in
php for 5 years) was the odd mix of syntax.  It's a mixture of a couple 
of

languages.  Because I was new to unix and shell syntax it was a bit of
time before I started to feel comfortable.  Considering 70% of the 
internet

is run off of *nix flavored servers it's not a bad skill to have.

The benefits of having moved to perl from php are too many to count.
Just the efficiency of perl's string manipulation cut my code down by
up-to 50% in some cases.  Perls abilities to be used both procedurally
as well Object Oriented makes it easy for me to use it which ever way
is most useful for my task.

Moving from PHP to Perl has been the smartest move I've made.  Our
code is more secure (we use a proxy system to keep it completely 
separate
from our client's file server.)  Our system is more stable and 
responsive.

And my code is 100% easier to maintain.

Although I could have used Python or even stuck with PHP and 
accomplished
most of what I'm doing, it would take more time, and wouldn't be nearly 
as much
fun.  In my situation (building a CMS without funding, etc.) I don't 
think I would
have made it this far without being inspired as I was by perl, mod_perl 
and

all that they can do.

Did I mention CPAN?

My hat is off to the Perl/mod_perl community for giving such an 
opportunity.

When in history has it been so bright?

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Feb 16, 2006, at 7:41 AM, Clinton Gormley wrote:


It seems to me that a lot of people new to mod_perl and to Perl have
joined this mailing list recently.

And this is during a period when popular opinion (amongst those who 
know

no better) seems to regard Perl as antiquated.

I'm delighted that new people are joining.

My question is, what prompted you? What made you choose Perl above
Java/.Net/Python/Ruby etc etc

Do you have experience of those languages? What appeals to you about
Perl? And how do you find your community experience/support compared to
the other languages you know?

clint








RE: 2.02 make fails: cannot find -lperl

2006-02-16 Thread Chris Werner
Title: RE: 2.02 make fails: cannot find -lperl





Tom Setka wrote:


> Apache 2.0.55 has been installed on my PC's hard drive 


So why not compile and install perl in the same [or a similar] directory structure?
I always build all the tools I will need.


Just a thought,


Christian Werner





RE: FW: MP2 PerlTransHandler and VirtualHosts

2006-02-16 Thread Peter, Attila
 I did return DECLINED since I've read the documentation
and it was clear to me that I had to return DECLINED,
however, the handlers seemed to get stacked.

So what happens is that if my PerlTransHandler for virtual host
foo returns declined the My::Foo handler will still run and if
that one also returns DECLINED then will the apache's default handler
run.

--Attila


-Original Message-
From: Fred Moyer [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 15. Februar 2006 18:52
To: Geoffrey Young
Cc: Frank Wiles; Peter, Attila; modperl@perl.apache.org
Subject: Re: FW: MP2 PerlTransHandler and VirtualHosts

>>  PerlTransHandler Apache2::Const::OK
>
> I didn't take the time to read the entire thread, but based on the 
> suggestion of using default-handler I figured the goal was something 
> like this
>
> PerlTransHandler My::Foo
>
> 
>   # unset the above trans handler
> 
>
> if that's the case then you want to return DECLINED instead of OK.  OK

> means that translation was completed and the httpd default _should not

> run_, while DECLINED means translation has not yet completed and the 
> httpd default _should run_.

I was initially thinking to use DECLINED but then I thought that the
My::Foo transhandler would run after the vhost handler, ergo
transhandlers in vhosts and the main httpd config would be stacked
(that's where I was wrong), so OK would be appropriate (which it is
not).  Sometimes I wish I had a poster of the request lifecycle loop
from the cookbook on my wall to remind me that apache is still involved
after mod_perl does its work :)


Re: FW: MP2 PerlTransHandler and VirtualHosts

2006-02-16 Thread Geoffrey Young


Peter, Attila wrote:
>  I did return DECLINED since I've read the documentation
> and it was clear to me that I had to return DECLINED,
> however, the handlers seemed to get stacked.
> 
> So what happens is that if my PerlTransHandler for virtual host
> foo returns declined the My::Foo handler will still run and if
> that one also returns DECLINED then will the apache's default handler

ah yeah, that's the way it's supposed to happen :)  my bad.

one possible solution is to try this


  PerlOptions -MergeHandlers
  PerlTransHandler My::Return::Declined


if that doesn't work then you're left with the old solution - define what
you want in each virtual host and nothing in the main server config.  or
even passing some sort of communication around via $r->notes.

--Geoff


Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Jonathan Vanasco


On Feb 16, 2006, at 8:56 AM, Geoffrey Young wrote:
there's no reason why mp2 shouldn't work with httpd 2.2 at the  
moment in
almost all respects.  in fact, the only thing that I can think of  
that will
not work is the auth provider mechanism, but there's a CPAN module  
for that,

too, so you should be good to go.

but that said, reporting back any specific breakage with mod_perl  
under 2.2

to the dev list would be helpful


I'm just thinking forward - I still use 2.0.55 -- but the  
'recommended stable' on apache.org is 2.2 now, and all the MP2 docs  
on perl.apache.org specifically state Apache 2.0



perhaps adding some sort of roadmap to the site too?

patches welcome :)


what's the standard for submitting a new page / section ?  is there a  
template?


the documentation for existing features is plentiful - there's just
nothing i've been able to find on future plans for the project -  
and  I

know you all have direction


since mp2 is almost completely compatible with httpd 2.2 I don't  
really
understand the question.  yeah, there are a few places where we  
should tie
in more tightly with 2.2 but those instances shouldn't really be  
holding
anyone back.  but I guess if pressed our future plans would be to  
keep on

supporting httpd as it evolves - that's always been the goal :)


there's just no 'official' statement that its compatible, or that it  
works.


perhaps add this to perl.apache.org under a roadmap section  
(rewritten from your text):


= RoadMap =

== Goal ==
ModPerl will continue supporting httpd as it evolves.

The current 2.0 branch works with httpd 2.0.x and 2.2.x, though  
integration with the 2.2.x system has not been fully completed and  
continues under active development.


The deprecated 1.0 branch works with httpd 1.3

And Then on http://perl.apache.org/download/index.html
===
Current releases:

mod_perl 1.0: Version 1.29 - Oct 7, 2003
Download | Browse | Changes | Installation
mod_perl 2.0: Version 2.0.2 - October 20, 2005
Download | Browse | Changes | Installation

-- becomes --

Current releases:

mod_perl 1.0: Version 1.29 - Oct 7, 2003
Requires httpd 1.3.x
Download | Browse | Changes | Installation

mod_perl 2.0: Version 2.0.2 - October 20, 2005
Requires httpd 2.0.x or httpd 2.2.x
Download | Browse | Changes | Installation





Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Perrin Harkins
On Thu, 2006-02-16 at 11:50 -0500, Jonathan Vanasco wrote:
> what's the standard for submitting a new page / section ?  is there a  
> template?

There's a set of instructions on how to download the source and add
things to it:
http://perl.apache.org/contribute/index.html

- Perrin



Re: MP2 PerlTransHandler and VirtualHosts

2006-02-16 Thread Frank Maas
On Thu, Feb 16, 2006 at 11:31:00AM -0500, Geoffrey Young wrote:
> 
> 
> Peter, Attila wrote:
> >  I did return DECLINED since I've read the documentation
> > and it was clear to me that I had to return DECLINED,
> > however, the handlers seemed to get stacked.
> > 
> > So what happens is that if my PerlTransHandler for virtual host
> > foo returns declined the My::Foo handler will still run and if
> > that one also returns DECLINED then will the apache's default handler
> 
> ah yeah, that's the way it's supposed to happen :)  my bad.
> 
> one possible solution is to try this
> 
> 
>   PerlOptions -MergeHandlers
>   PerlTransHandler My::Return::Declined
> 
> 
> if that doesn't work then you're left with the old solution - define what
> you want in each virtual host and nothing in the main server config.  or
> even passing some sort of communication around via $r->notes.

Wouldn't it be possible to define a variable (PerlSetVar) per vhost, or 
only for those vhosts that one does not want the TransHandler to run for? 
Check for the value of that variable in the handler and skip the remainder 
of it if appropriate.

Frank



Re: A question for the newbies

2006-02-16 Thread Frank Wiles
On Thu, 16 Feb 2006 09:42:49 -0500
"Mark Galbreath" <[EMAIL PROTECTED]> wrote:

> I miss the reference dot notation of Java and other OO languages,
> however.  Why didn't Larry include that?  And the 'use v. require'
> issue seems silly to me.  Why not a simple 'import' statement?  And
> the accessor schema and issues of 'my v. our v. local' and package
> transparency seems hackneyed to me.  Perhaps 6.0 will address issues
> like these?  I haven't looked. 

  Just an FYI, Perl 6 will use the dot notation for calling methods. 
  
  Having just an "import" would reduce the flexibility.  And actually
  the subroutine 'import()' is there, but it is in the actual module 
  ( or inherited from something like Exporter ) and called so the
  module can determine what to import itself. "use Foo;" is just a
  convient wrapper for: 

  BEGIN { require Foo; import Foo; }

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 -



Re: A question for the newbies

2006-02-16 Thread Saltbreez
Well, I'm a newbie that has [and has used] a pink copy of the Camel book 1.
I choose perl _BECAUSE_ it was antiquated then; awk, sed and perl had stood the test of time.

Community? Perl was built by those with need for those with need; 
I hear a corporation "owns" Java... and as for the creater of .NET, I
like to think I own my [car, telephone, computer] .

1  Admittedly, my 2nd ed. has more wear...
On 2/16/06, Clinton Gormley <[EMAIL PROTECTED]> wrote:
It seems to me that a lot of people new to mod_perl and to Perl havejoined this mailing list recently.And this is during a period when popular opinion (amongst those who knowno better) seems to regard Perl as antiquated.
I'm delighted that new people are joining.My question is, what prompted you? What made you choose Perl aboveJava/.Net/Python/Ruby etc etcDo you have experience of those languages? What appeals to you about
Perl? And how do you find your community experience/support compared tothe other languages you know?clint-- Do you know how high...   The Salt Breez
the
Robin
flies,  
Also Know As ...Or why the Mint leaf...   Christian Werner Srsmells
so
sweet?  
[EMAIL PROTECTED]The Salt Breez


Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Jonathan


On Feb 16, 2006, at 11:53 AM, Perrin Harkins wrote:


Ohere's a set of instructions on how to download the source and add
things to it:
http://perl.apache.org/contribute/index.html

- Perrin


oh great!  its in svn too.

i'll send stuff to docs-dev asap.  thanks!


Re: A question for the newbies

2006-02-16 Thread Michael Greenish
I've been writing in perl for just over a year.  I was
a developer in embedded controls, but had an idea for
a website and some free time so started learning perl.
 I had a strong C++ background so understood OO pretty
well.  I chose Perl because I had heard so much about
it.  My first site was pure scripting, all code & html
in one file.  It was such a mess but a great learning
experience.

After switching jobs, I had the opportunity to take a
"java for the web" class and learned the MVC way.  I
was eager to apply this to my web project, however it
took me quite a while to figure out how to write OO
with Perl.  In fact, I really struggled for several
weeks.  I looked around on the web for a while, tried
to study the modperl apache site's examples, but just
couldn't derive a good code example; I understood OO,
I knew that perl could do OO and I couldn't find
design patterns to go to the next step.  It wasn't
until I happened to run across "Learning Perl Objects,
References, and Modules", by Randal L. Schwartz that I
started to develop a web pattern for implementing MVC
with perl.  If it wasn't for that book, I probably
would have given up.  Even with that, it took me a
while to figure out how to write good constructors.  I
looked plenty, but I just couldn't seem to find the
right info on the web.

Taking a step back, after that java class, I
considered Java struts.  I like much of the language
syntax, such as the "." vs "->" notation.  However,
the prospect of setting up Tomcat on top of learning
Apache by myself seemed daunting.  In addition, Java
Struts seems overkill for most applications.  

5 months ago, I changed jobs again and now work in a
PHP only shop.  What I miss from Perl with PHP is how
broad the language is.  There seem to be no limits to
Perl. The syntax is easy and extensive. I can do unix
tasks and web task.  And there are so many reliable
modules available via  CPAN.  PHP has pear, but its
not nearly as extensive.  The other thing I miss about
perl when programming in PHP is the arrays.  In PHP,
there are associative arrays; I uses complex sets of
anonymous hashes and arrays all the time in perl, but
it's harder to do the same thing in PHP. And I find
dereferencing harder too.  And of course, perl regex
is 100x better than PHP's limit string matching and
grepping.

What I like about PHP over perl is the ease of
variable declaration.  I feel I have to use strict
with perl, I would like the ability to not have to put
"my" in front of every new variable.  Probably 1/4 of
my errors when debugging pages for the first time are
undeclared variables.  Seems  stupid and I try to be
thorough, but it still happens and it's a nuisance. 
My biggest complaint for perl for web apps, however,
is the templating.  I haven't found a template module
in perl that rivals Smarty templates in PHP.  What's
with this crazy loop structure in HTML Templates?  Why
can't I just iterate over an array without having to
put it in a crazy anonymous array thing.  I can access
any array element with ".".  Smarty plugin's are
great.  They help with creating select drop downs,
date drop downs.  I can capitalize, count, strip
template variables within smarty.  There seems to be
so much more I can do with Smarty than with
HTML::Template.  Maybe I just missed all that stuff in
the documentation but again, I didn't find it.  Also,
it's much easier to include a code snippet in php than
in perl.

Today, Perl is still my personal favorite language to
code for web/unix task.  However at work, I am
implementing MVC in PHP 4 much like I did with Perl
using the basic OO capabilities available in 4. 
Interface functions don't help in the web apps I do
(small - medium) so I don't see to much need for us to
move to 5.  But that's another topic.  

That's my experience so far with perl vs PHP vs Java
so far.

greanie

--- Boysenberry Payne <[EMAIL PROTECTED]>
wrote:

> I guess I'm still considered a mod_perl / perl
> newbie.  I started 
> learning perl 6 months
> ago in anticipation of translating a CMS (Content
> Management System) I 
> wrote in PHP.
> 
> I considered Python, and  C++ as alternatives.  C++
> was over kill and 
> would require
> way too much development just to get going (why
> reinvent the wheel if I 
> don't have to.)
> Python, seemed too similar to PHP for my tastes.  I
> don't like being 
> "forced" to use
> someone else's coding conventions unless I know
> there are valid reasons 
> for it.
> With what I read about Python's white space issues,
> I thought it might 
> be more
> tedious, rather than easier to maintain my 50+ files
> of code.
> 
> Once I started looking into perl I was blown away. 
> Not only has perl 
> been the "swiss
> army knife" of system administration for well over
> 10 years, but 
> mod_perl blows the
> socks off of php.
> 
> So for my particular project I couldn't find a
> better solution.
> 
> I think the hardest part about learning perl (coming
> from developing in
> php for 5 years) was the o

Re: A question for the newbies

2006-02-16 Thread Mark Galbreath


Many people do not realize that the core of .NET is an open standard.  It was submitted to ECMA and approved 3 years ago.  There is, in fact, a pretty robust open source .NET project on SourceForge: Mono.  Since Java 5.0 was released, however, the interest in C# has decreased, and no one was ever enthusiastic about the VB/ADO technology lines (which M$ kept proprietary) except the Microserfs.
 
As for Java, technically Sun holds the rights, but realistically, the Java Community determines its future.  The JCP is not open source, but it's pretty close.  Sun has promised for years to release Java to open source but has not done so yet.  It did, however, just release Solaris, so perhaps Java is not far behind.  Practically speaking, however, Java is as free as any open source technology.  And it's practitioners, like perlites, tend to be evangelicals.  Just look at what an impact Java has had on the formerly C++ - centric crowd at Apache.  There is probably a JUG near you.
 
Linux commands much the same enthusiasm as the Java and Perl communities, and though not nearly as numerous, there are small rabid groups of smalltalkers, lispers (including the truly deranged schemers), pythonites (on a quest), and rubyites.  I think the sociology of these technical communities is fascinating.  Including the one in which we are participating right now.  The best friends I have in my life were met on lists like this.
 
And then there is Eris S. Raymondthe AntiChrist.
>>> Saltbreez <[EMAIL PROTECTED]> 16-Feb-06 12:21:24 PM >>>
Well, I'm a newbie that has [and has used] a pink copy of the Camel book 1.I choose perl _BECAUSE_ it was antiquated then; awk, sed and perl had stood the test of time.Community? Perl was built by those with need for those with need;  I hear a corporation "owns" Java... and as for the creater of .NET, I like to think I own my [car, telephone, computer] .1 Admittedly, my 2nd ed. has more wear...
On 2/16/06, Clinton Gormley <[EMAIL PROTECTED]> wrote:
It seems to me that a lot of people new to mod_perl and to Perl havejoined this mailing list recently.And this is during a period when popular opinion (amongst those who knowno better) seems to regard Perl as antiquated. I'm delighted that new people are joining.My question is, what prompted you? What made you choose Perl aboveJava/.Net/Python/Ruby etc etcDo you have experience of those languages? What appeals to you about Perl? And how do you find your community experience/support compared tothe other languages you know?clint-- Do you know how high...   The Salt Breez the Robin flies,   Also Know As ...Or why the Mint leaf...   Christian Werner Srsmells so sweet?   [EMAIL PROTECTED]The Salt Breez 


Re: A question for the newbies

2006-02-16 Thread Michael Peters
Some selective answers...(not really relevant to your present job, but maybe
more helpful in the future)

Michael Greenish wrote:

> I looked around on the web for a while, tried
> to study the modperl apache site's examples, but just
> couldn't derive a good code example; I understood OO,
> I knew that perl could do OO and I couldn't find
> design patterns to go to the next step.

Did you ever happen upon CGI::Application? It's pretty popular for OO/MVC web 
stuff.

> What I like about PHP over perl is the ease of
> variable declaration.  I feel I have to use strict
> with perl, I would like the ability to not have to put
> "my" in front of every new variable.  Probably 1/4 of
> my errors when debugging pages for the first time are
> undeclared variables.

That might be the first errors that you fix when you're first trying new code,
but it would save you from so many other errors down the road.


> My biggest complaint for perl for web apps, however,
> is the templating.  I haven't found a template module
> in perl that rivals Smarty templates in PHP.

Did you ever try Template Toolkit? I'd say it's probably more popular than
HTML::Template, and much less restrictive (although you also have more rope to
hang yourself too) and can do everything that you mentioned below.

> That's my experience so far with perl vs PHP vs Java
> so far.

Thanks for sharing.

-- 
Michael Peters
Developer
Plus Three, LP



Re: A question for the newbies

2006-02-16 Thread Perrin Harkins
On Thu, 2006-02-16 at 09:48 -0800, Michael Greenish wrote:
> What I like about PHP over perl is the ease of
> variable declaration.  I feel I have to use strict
> with perl, I would like the ability to not have to put
> "my" in front of every new variable.  Probably 1/4 of
> my errors when debugging pages for the first time are
> undeclared variables.  Seems  stupid and I try to be
> thorough, but it still happens and it's a nuisance.

That's Perl letting you know you have bugs, which you asked it do by
putting "use strict" at the top.  If you don't use strict, it will let
you keep your bugs.

> My biggest complaint for perl for web apps, however,
> is the templating.  I haven't found a template module
> in perl that rivals Smarty templates in PHP.

It sounds like you somehow missed Template Toolkit:
http://www.template-toolkit.org/docs/default/Tutorial/Web.html

- Perrin



Re: A question for the newbies

2006-02-16 Thread Tyler MacDonald
Perrin Harkins <[EMAIL PROTECTED]> wrote:
> > My biggest complaint for perl for web apps, however,
> > is the templating.  I haven't found a template module
> > in perl that rivals Smarty templates in PHP.
> It sounds like you somehow missed Template Toolkit:
> http://www.template-toolkit.org/docs/default/Tutorial/Web.html

OK, this is the fifth time this morning I've heard about
template::toolkit. It all started when a friend that I'm working on an AJAX
library with came up to me and said "hey, ingy's rewritten Template::Toolkit
in javascript! This solves our MVC problem!"

(If you want to see that madness, check here: http://ingy.net/ )

Template::Toolkit might Do Stuff, but it does it in (IMHO) a
backwards way. I mean, we're already using HTML, CSS, probably a bit of XML,
and Perl. Why the hell do we want to throw *another* language into the mix?
Why am I forced to say

[% FOREACH(blah) foo %]

Instead of the

[% for my $i (@foo) %]

I've become happily used to?

On that note, if you need a good templating system in perl that
actually IS perl and not some contrived thing, try Mason. I don't actually
use the stuff myself, but it looks a hell of a lot more simple and elegant
than TT. :)

- Tyler



Re: A question for the newbies

2006-02-16 Thread Jonathan


On Feb 16, 2006, at 12:48 PM, Michael Greenish wrote:


What I like about PHP over perl is the ease of
variable declaration.  I feel I have to use strict
with perl, I would like the ability to not have to put
"my" in front of every new variable.


putting my / our before variables is good though.


is the templating.  I haven't found a template module
in perl that rivals Smarty templates in PHP.


Have you looked at Template::Toolkit ? Or Mason ?


any array element with ".".  Smarty plugin's are
great.  They help with creating select drop downs,
date drop downs.  I can capitalize, count, strip
template variables within smarty
All the perl templating engines allow that.  there's also FormBuilder  
and other things



so much more I can do with Smarty than with
HTML::Template.  Maybe I just missed all that stuff in
the documentation but again, I didn't find it.  Also,
it's much easier to include a code snippet in php than
in perl.
HTML::Template is a simple barebones templating system.  its not a  
robust approach like Smarty.  You should be looking at TT and MAson.



Today, Perl is still my personal favorite language to
code for web/unix task.  However at work, I am
implementing MVC in PHP 4 much like I did with Perl
using the basic OO capabilities available in 4.
Interface functions don't help in the web apps I do
(small - medium) so I don't see to much need for us to
move to 5.  But that's another topic.
I'd suggest looking at TAL the Template Attribute Language.  The  
specification is on the Zope website (python).  There are perl and  
php implementations (be warned though, the php version is a bit slow,  
so i suggest using a code caching system like eaccelerator with it).   
It's rather nice if you're doing cross-language development, because  
the same templates will work in just about any language.






Re: A question for the newbies

2006-02-16 Thread Randal L. Schwartz
> "Tyler" == Tyler MacDonald <[EMAIL PROTECTED]> writes:

Tyler> Why am I forced to say

Tyler>  [% FOREACH(blah) foo %]

Tyler>  Instead of the

Tyler>  [% for my $i (@foo) %]

Tyler>  I've become happily used to?

Because the day will come when you want to replace

foo.a # get $foo->{a}

with

foo.a # invoke $foo->a

and you don't want to teach your HTML-whackers to change their
syntax everywhere.

The nice thing about TT is that it hides nearly everything into
a much more Perl6-like syntax.  Oh, and loop.first and loop.last *rock*.

If you find yourself agonizing over the very-easy-to-learn TT syntax,
you're doing *too* much in TT.  It's self-limiting.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 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: A question for the newbies

2006-02-16 Thread Perrin Harkins
On Thu, 2006-02-16 at 10:10 -0800, Tyler MacDonald wrote:
>   OK, this is the fifth time this morning I've heard about
> template::toolkit. It all started when a friend that I'm working on an AJAX
> library with came up to me and said "hey, ingy's rewritten Template::Toolkit
> in javascript! This solves our MVC problem!"

Ouch.

> Why am I forced to say
> 
>   [% FOREACH(blah) foo %]
> 
>   Instead of the
> 
>   [% for my $i (@foo) %]

You're not.  TT supports in-line Perl, and so do some other high-quality
templating tools for Perl:
http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html

- Perrin



Re: A question for the newbies

2006-02-16 Thread John ORourke
This thread has brought out some quite interesting marketing (as in 
advocacy and understanding) issues so far - any volunteers for adding to 
or creating a FAQ about getting into mod_perl?


John




Re: A question for the newbies

2006-02-16 Thread Jonathan

Just because I like to advocate TAL:


  
   First item?
   Even item?
   Odd item?
   Replaced by Foo{'blah'}{'var'}
   Replaced by Foo{'blah'}->method() 


 


template:
renders in browser without code, as it would be seen
is valid markup
works in multiple languages
has multiple perl implementations
	mini language is stupid and simple enough that designers don't have  
enough control to screw things up


On Feb 16, 2006, at 1:33 PM, Randal L. Schwartz wrote:


"Tyler" == Tyler MacDonald <[EMAIL PROTECTED]> writes:


Tyler> Why am I forced to say

Tyler>   [% FOREACH(blah) foo %]

Tyler>   Instead of the

Tyler>   [% for my $i (@foo) %]

Tyler>   I've become happily used to?

Because the day will come when you want to replace

foo.a # get $foo->{a}

with

foo.a # invoke $foo->a




Re: A question for the newbies

2006-02-16 Thread Daniel McBrearty
A quick word in amongst the other stuff - couldn't agree more about the horriblenes of PHP's treating hashes and arrays as one thing. It was a pretty instant put off for me when I looked at that language a year or two back.
One question about the various template systems and mod_perl : is there not a performance hit in using these? If there is effectively perl code in the template which actually changes with different pages that load, isn't mod_perl forced to recompile the code for each request?
If not how?When I looked at all this a while back, I figured that this must be the case, and went with CGI::FastTemplate as it uses pure regex matching, I suspected it was likely to avoid this. Was I wrong? Is my code actually quicker than it would have been with TT / Mason?
This is of more than academic interest as I may well switch to Catalyst soon, if I do so I might redo my templates at the same time. So I'd like to know.thanks. Good thread.-- Daniel McBrearty
email : danielmcbrearty at gmail.comwww.engoi.com : the multi - language vocab trainerBTW : 0873928131


Re: A question for the newbies

2006-02-16 Thread Perrin Harkins
On Thu, 2006-02-16 at 22:14 +0100, Daniel McBrearty wrote:
> One question about the various template systems and mod_perl : is
> there not a performance hit in using these?

As opposed to not using anything?  Yes.  They are much faster than what
people usually write on their own though.

>  If there is effectively perl code in the template which actually
> changes with different pages that load, isn't mod_perl forced to
> recompile the code for each request? 

There are different pages for different templates, but once they have
been compiled they don't need to be loaded again.  See my templating
article for more on how this works.

> When I looked at all this a while back, I figured that this must be
> the case, and went with CGI::FastTemplate as it uses pure regex
> matching, I suspected it was likely to avoid this. Was I wrong? Is my
> code actually quicker than it would have been with TT / Mason? 

Probably slower.  TT and Mason don't need to do any regexes because they
have compiled the template to a perl sub.  They don't have to parse the
template at all after the first request in each process.  Of course they
have their own sources of overhead, but template parsing is not one of
them.

- Perrin



Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Jie Gao



On Thu, 16 Feb 2006, Geoffrey Young wrote:

>
> there's no reason why mp2 shouldn't work with httpd 2.2 at the moment in
> almost all respects.  in fact, the only thing that I can think of that will
> not work is the auth provider mechanism, but there's a CPAN module for that,
> too, so you should be good to go.

Can you please elaborate on the "auth provider mechanism" problem a bit here?

Thanks,



Jie


Re: mp2 and httpd 2.2 - future plans / roadmap?

2006-02-16 Thread Geoffrey Young


Jie Gao wrote:
> 
> 
> On Thu, 16 Feb 2006, Geoffrey Young wrote:
> 
> 
>>there's no reason why mp2 shouldn't work with httpd 2.2 at the moment in
>>almost all respects.  in fact, the only thing that I can think of that will
>>not work is the auth provider mechanism, but there's a CPAN module for that,
>>too, so you should be good to go.
> 
> 
> Can you please elaborate on the "auth provider mechanism" problem a bit here?

well, it's not a problem.  it's just that a feature in 2.2 isn't supported
in mod_perl 2.0 yet.  this article is old but explains some of the
differences and has pointers to more articles at the end.

  http://www.perl.com/pub/a/2003/07/08/mod_perl.html

--Geoff


Re: A question for the newbies

2006-02-16 Thread Daniel McBrearty
Thanks Perrin. Great article. I remember reading it a while back, and was a bit overwhelmed with info at the time, but good to come back to it. It starts to fall into place more now.Can you give any recs on choosing a templating system if memory use is also a factor?
My site currently runs on a VM with 80M memory. I run between 1 and 3 mod_perl instances in that at present - they are around 13MB each. No doubt I will upgrade at some point, even so I'd like to use a better choice of templating system for mod_perl without upping the size of each process too much.
Maybe I ought to try to do some simple comparison tests of this at some point. But if you or anyone else has "been there done that" I'd like to hear about it.On 2/16/06, 
Perrin Harkins <[EMAIL PROTECTED]> wrote:
On Thu, 2006-02-16 at 22:28 +0100, Daniel McBrearty wrote:> Hmmm. Thanks Perrin. Shame I hadn't been onto this list back then ...> Can you point me at teh article?Here it is:
http://perl.apache.org/docs/tutorials/tmpl/comparison/comparison.html-- Daniel McBreartyemail : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainerBTW : 0873928131


Re: A question for the newbies

2006-02-16 Thread Perrin Harkins
On Thu, 2006-02-16 at 23:13 +0100, Daniel McBrearty wrote:
> Can you give any recs on choosing a templating system if memory use is
> also a factor? 

The one you have (CGI::FastTemplate) or Apache::SSI are pretty good in
low-memory situations.  Others like TT and HTML::Template can be set to
not cache things in memory, but it will slow them down.  (They do some
disk-based caching, but it's nowhere near as fast.)

In my opinion, it's still worth it to use a more powerful system for
most people, even if it's slightly slower than FastTemplate or SSI.  The
exception is running under CGI, where code compiling really hurts you.

- Perrin



Re: A question for the newbies

2006-02-16 Thread Jonathan Vanasco


On Feb 16, 2006, at 4:20 PM, Perrin Harkins wrote:


On Thu, 2006-02-16 at 22:14 +0100, Daniel McBrearty wrote:

One question about the various template systems and mod_perl : is
there not a performance hit in using these?


and whatever the performance hit is - remember that 90% of your  
processor time is spent on the page logic / DB interaction.  if you  
come across any major performance issues, you can try caching entire  
pages, or parts of pages, into memcached or something similar to  
avoid repetitive tasks.


after playing with templating systems for far too long - i offer this  
golden piece of advice: use whatever templating system gives you the  
best templates for your needs (be it natural writing or speed of  
writing, or standards compliant, or easy to use by html monkeys).   
the biggest performance gain to get with any templating engine is in  
authoring the template itself .



 If there is effectively perl code in the template which actually
changes with different pages that load, isn't mod_perl forced to
recompile the code for each request?

There are different pages for different templates, but once they have
been compiled they don't need to be loaded again.  See my templating
article for more on how this works.

When I looked at all this a while back, I figured that this must be
the case, and went with CGI::FastTemplate as it uses pure regex
matching, I suspected it was likely to avoid this. Was I wrong? Is my
code actually quicker than it would have been with TT / Mason?


Probably slower.  TT and Mason don't need to do any regexes because  
they
have compiled the template to a perl sub.  They don't have to parse  
the
template at all after the first request in each process.  Of course  
they

have their own sources of overhead, but template parsing is not one of
them.


petal does the same thing,  most of the templating systems also seem  
to have their own caching mechanism somewhere as well.


i've found that most templating systems take an awful performance hit  
when they compile the templates into perl subs.  it would be nice if  
every engine had a flag that let you specify if the template was  
precompiled or not, and came with a tool to recursively precompile  
template directories.  but i can wait the extra 3 seconds on startup.


the only thing that i would suggest when using these under mod perl  
is this: run something on startup that precompiles and caches all of  
the templates just as it does to the perl modules/packages.  i  
realized a big memory killer in my Petal use was that templates were  
being cached by ModPerl as accessed , instead of on startup.  with  
300k of html templates, that means that every 3 apache children  
equate to 1mb of shared memory that i could have consolidated them into.


Re: A question for the newbies

2006-02-16 Thread Malcolm J Harwood
On Thursday 16 February 2006 05:23 pm, Jonathan Vanasco wrote:

> On Feb 16, 2006, at 4:20 PM, Perrin Harkins wrote:

> > Probably slower.  TT and Mason don't need to do any regexes because
> > they have compiled the template to a perl sub.  They don't have to parse
> > the template at all after the first request in each process.  

Mason also caches the parsed template the first time it loads a component (or 
after it changes) so whilst it still has to compile the perl for each 
process, it doesn't have to translate the template.

> i've found that most templating systems take an awful performance hit
> when they compile the templates into perl subs.  it would be nice if
> every engine had a flag that let you specify if the template was
> precompiled or not, and came with a tool to recursively precompile
> template directories.  but i can wait the extra 3 seconds on startup.

You can do that with Mason I believe. (I haven't myself as generally the 
template->perl on first access is sufficient for me). You could probably 
write something to preload them all too.



Re: A question for the newbies

2006-02-16 Thread Daniel McBrearty
On 2/16/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
On Feb 16, 2006, at 4:20 PM, Perrin Harkins wrote:> On Thu, 2006-02-16 at 22:14 +0100, Daniel McBrearty wrote:>> One question about the various template systems and mod_perl : is>> there not a performance hit in using these?
and whatever the performance hit is - remember that 90% of yourprocessor time is spent on the page logic / DB interaction.  if youcome across any major performance issues, you can try caching entirepages, or parts of pages, into memcached or something similar to
avoid repetitive tasks.Right. My site is inherently multilingual, and that's done with templates. But all teh bog standard site text is in one big cached hash, that saves db queries. That helped quite a lot. That mechanism doesn't have to change at all if I change template systems.
after playing with templating systems for far too long - i offer thisgolden piece of advice: use whatever templating system gives you the
best templates for your needs (be it natural writing or speed ofwriting, or standards compliant, or easy to use by html monkeys).the biggest performance gain to get with any templating engine is inauthoring the template itself .
True. Currently I have a nasty mix of perl and html all over, all though it's not too unmanageable as teh site is small. But it's an obstacle to growth, so my mind is going towards catalyst/TT or something and a big rewrite. I need to do a lot of db reorganisation and such anyhow. I just don't want to do all that and end up with a 60 MB mod_perl process (which I hear is not that uncommon). That would be very annoying.
I guess I'll have to do some simple experiments and extraploate from there. No rush anyhow, I can take my time. Thanks all. Sleep time for me.-- Daniel McBrearty
email : danielmcbrearty at gmail.comwww.engoi.com : the multi - language vocab trainerBTW : 0873928131


Re: detecting server start, stop, graceful in startup.pl

2006-02-16 Thread Philippe M. Chiasson
Ken Perl wrote:
> I add your code to my startup.pl, but it doesn't work.

Change 'print' to warn and you should see the expected behaviour.

The only exception is stop, that doesn't go thru a restart cycle, so the
correct way to detect a shutdown is to register a server_shutdown callback
like this :

Apache2::ServerUtil::server_shutdown_cleanup_register(sub { warn "I am shutting 
down" });

> # apache2ctl -k start
> Program is starting
> Stopping...
> 
> #apache2ctl -k graceful
> 
> 
> # apache2ctl -k stop
> 
> 
> On 2/13/06, Frank Wiles <[EMAIL PROTECTED]> wrote:
> 
>>On Mon, 13 Feb 2006 09:17:57 +0800
>>Ken Perl <[EMAIL PROTECTED]> wrote:
>>
>>
>>>No, I want to do something in the startup.pl script.
>>>When apache start, I also want to say my modperl program is starting
>>>and started, when stop, I want to say my modperl program is stopping
>>>and stopped. When graceful, I want to say reloading and reloaded.
>>>But I didn't find a API could help, any ideas?
>>
>> Hi Ken,
>>
>> I haven't tested this, but it should work. In your startup.pl do
>> something like this:
>>
>> my $started = 0;
>> my $cnt = Apache2::ServerUtil::restart_count();
>>
>> if( !$started and $cnt == 1 ) {
>>  $started = 1;
>>  print "Program is starting\n";
>> }
>>
>> if( $cnt > 2 ) {
>>  print "Restarting";
>> }
>>
>> if( $started and $cnt == 1 ) {
>>  print "Stopping...";
>> }
>>


Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Foo Ji-Haw



I have not much experience with ActivePerl on non-Win32 
platforms, so this is mostly my conjecture:
 
While ActivePerl is available on most popular platforms, 
it's strengths are mostly on the Windows platform, where many administrative and 
windows-centric components can be controlled. I have spent much of my Perl time 
on the Windows platform, and while it has its quirks, ActivePerl's ppd bank 
makes it really easy to load in a new module, and I am grateful for that (I have 
to date not needed to compile any modules).
 
I don't know how most people use Perl, but for me, it's 
mostly for commercial purposes, and less an administrative tool. I love 
it!

  - Original Message - 
  From: 
  Mark 
  Galbreath 
  To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  
  Cc: modperl@perl.apache.org 
  Sent: Thursday, February 16, 2006 9:47 
  PM
  Subject: Re: mod_perl 2.0.0 + Apache 
  2.0.55 on Cygwin Win2k3
  
  A word of caution from personal experience here.
   
  First, I love ActiveState' s stuff - I bought (out of my pocket) personal 
  and pro licenses for Komodo 3.2 and 3.5.  I run ActivePerl 5.8 and 
  ActivePython 2.4 on my Winblows and Linux boxes at home.  So what's the 
  prob?
   
  At the office, installing ActivePerl just annoyed the sysadmins because 
  it didn't really break anything but I found myself in the position of begin 
  able to take advantage of some pretty cool modules (like IO::ALL, e.g.) that 
  have been upgraded or designed for 5.8 when the infrastructure remains at 
  5.6.  I didn't think of this (doh!) until I tried deploying a little app 
  I wrote and found it wouldn't work.  Make sure your infrastructure will 
  support your upgrade!
   
  Second, and though way more serious for me but perhaps not for you, I did 
  the same with ActivePython and it broke all the system utilities on my Red Hat 
  Enterprise 4 workstation.  This really pissed off the sysadmins and 
  raised flags with the Security folks.
   
  Third, one of the linux support folks here told me they were not 
  supporting ActiveState products because the company was in the process of 
  dissolving or being bought or something that made service and support 
  continuity questionable.  Can anybody confirm this?
   
  Mark<-|->kraM>>> Tom Schindl 
  <[EMAIL PROTECTED]> 16-Feb-06 09:20:29 AM >>>
  It's free ;-) http://www.activestate.com/TomJeff 
  Pang wrote:>> Why don't you try ActivePerl instead of cygwin 
  ?>  > Is there any free version of ActivePerl£¿or how much 
  should I pay for> it?thanks.> > 
  - Original Message -> *From:* Jason J. 
  Czerak > 
  *To:* modperl@perl.apache.org > 
  *Sent:* Thursday, February 16, 2006 4:28 AM> 
  *Subject:* mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3> 
  > I have an application that is based on 
  Apache::ASP. Apache::ASP> requires 
  Apache2::porting and Apache2::compat to be in the startup.pl.> 
  > Everything is working very well. I some how 
  got mod_perl to build> and running with out a 
  segfault. This is good. The issue is when> 
  startup.pl is called, either from the command line or within 
  apache> I get this error:> 
  > [Wed Feb 15 13:47:49 2006] [error] Can't 
  load> 
  '/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll'> 
  for module Apache2::ServerUtil: No such process 
  at> /usr/lib/perl5/5.8/cygwin/XSLoader.pm line 
  68.\n at> 
  /usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm 
  line> 30\nCompilation failed in require at 
  /u01/startup.pl line 4.\nBEGIN> 
  failed--compilation aborted at /u01/startup.pl line 
  4.\nCompilation> failed in require at (eval 2) 
  line 1.\n> > Suggestions?> 
  > I have also have this some what working on 
  native Win32 install of> perl/apache/mod_perl. 
  but apache goes into some sort of loop, eating> 
  memory and a kill is required, but this is random and only 
  after> some load testing.> > -- 
  > Jason Czerak ([EMAIL PROTECTED] )> 
  > > > > > > 
  __> 
  This email transmission and any documents, files or previous 
  email> messages attached to it may contain 
  information that is confidential or> legally 
  privileged. If you are not the intended recipient or a 
  person> responsible for delivering this 
  transmission to the intended recipient,> you 
  are hereby notified that you must not read this transmission 
  and> that any disclosure, copying, printing, 
  distribution or use of this> transmission is 
  strictly prohibited. If you have received this 
  transmission> in error, please immediately 
  notify the sender by telephone or return email> 
  and delete the original transmission and its attachments without 
  reading> or saving in any manner.> 
  > > --> Jeff

Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Foo Ji-Haw



The cause may be in your installation process 
(which should not be difficult). Maybe you relook the steps, or share the steps 
you took.

  - Original Message - 
  From: 
  Jason J. Czerak 
  To: Foo Ji-Haw 
  Cc: modperl@perl.apache.org 
  Sent: Thursday, February 16, 2006 10:28 
  PM
  Subject: Re: mod_perl 2.0.0 + Apache 
  2.0.55 on Cygwin Win2k3
  Note what I left in this reply... I suppose I should of 
  been more explicit in what I tried. AcriveState perl fails quicker then 
  perl.org perl binaries that I found.On Thu, 2006-02-16 at 10:43 
  +0800, Foo Ji-Haw wrote:
   
  Why don't you try 
ActivePerl instead of cygwin ? 
  
- Original Message - 

  
From: Jason J. Czerak 

  
To: modperl@perl.apache.org 

  
Sent: 
  Thursday, February 16, 2006 4:28 AM 
  
Subject: 
  mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3 
  
  
. 
  
I have also have this some what 
  working on native Win32 install of perl/apache/mod_perl. but apache goes 
  into some sort of loop, eating memory and a kill is required, but this is 
  random and only after some load testing.
  


  -- 
Jason Czerak ([EMAIL PROTECTED])


  


  
  


  -- 
Jason Czerak ([EMAIL PROTECTED])


  


  __This email transmission and any documents, files or previous emailmessages attached to it may contain information that is confidential orlegally privileged. If you are not the intended recipient or a personresponsible for delivering this transmission to the intended recipient,you are hereby notified that you must not read this transmission andthat any disclosure, copying, printing, distribution or use of thistransmission is strictly prohibited. If you have received this transmissionin error, please immediately notify the sender by telephone or return emailand delete the original transmission and its attachments without readingor saving in any manner.


Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
One of my hopes for mod_perl, is that it will evolve into a web
server-independent layer, that can be put on IIS as well (for example). I do
agree that Apache is a much stronger platform than IIS, but it is a bit iffy
to put all the eggs in the same basket...

- Original Message - 
From: "Arne Skjaerholt" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, February 16, 2006 11:11 PM
Subject: Re: A question for the newbies


> I'm not exactly a newbie anymore, but I came to mod_perl by way of Perl
> scripts for the shell. I'd already written some PHP, but when I learned
> Perl I saw the error of my ways as it were and realized that PHP really
> is quite the makeshift language and that developing in Perl was far more
> comfortable (and better for my sanity =).
>
> Also, once I understood what mod_perl was -really- about, I got all the
> more excited as it opens up a host of possibilities not available in
> PHP.
>
> Arne
> :wq



Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Foo Ji-Haw



To give you some confidence in ActivePerl+mod_perl 
on Win32, I have 2 years back implemented a mini ERP system ENTIRELY on this 
same platform, with a call centre, reception, billing and invoicing, and 
other administrative components. It sits on a 2 simple servers: 1 for the 
application, and the other for the database. It is still working 
today.
 

  - Original Message - 
  From: 
  Jason J. Czerak 
  To: Mark Galbreath 
  Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  ; modperl@perl.apache.org 
  Sent: Thursday, February 16, 2006 10:34 
  PM
  Subject: Re: mod_perl 2.0.0 + Apache 
  2.0.55 on Cygwin Win2k3
  Let me make this CLEAR please.Activestate perl, or any 
  other perl/mod_perl/Apache that I found for windows fails under any load with 
  zero error messages in any of the log files.  I need to do some sort of 
  trace or something to get any real info for you developers, this I know. But 
  in the mean time I'm looking for a quick solution.  The problem with 
  native perl/apache/mod_perl is that randomly something will hang and just eat 
  up memory and about 30% cpu.  We did benchmark load testing and just are 
  loading up the splash page over and over and over. Even at the rate of 4 
  requests per second, it will hand, it will take time, but it will hand... the 
  exact same config on Solaris is perfect.I'm sure it's something in 
  Apache::ASP and the Apache2:proting / Apache2:compat modules that hosing 
  things up.On Thu, 2006-02-16 at 08:47 -0500, Mark Galbreath 
  wrote: 
  A word of caution from personal 
experience here. 
   
  First, I love ActiveState' s 
stuff - I bought (out of my pocket) personal and pro licenses for Komodo 3.2 
and 3.5.  I run ActivePerl 5.8 and ActivePython 2.4 on my Winblows and 
Linux boxes at home.  So what's the prob? 
   
  At the office, installing 
ActivePerl just annoyed the sysadmins because it didn't really break 
anything but I found myself in the position of begin able to take advantage 
of some pretty cool modules (like IO::ALL, e.g.) that have been upgraded or 
designed for 5.8 when the infrastructure remains at 5.6.  I didn't 
think of this (doh!) until I tried deploying a little app I wrote and found 
it wouldn't work.  Make sure your infrastructure will support your 
upgrade! 
   
  Second, and though way more 
serious for me but perhaps not for you, I did the same with ActivePython and 
it broke all the system utilities on my Red Hat Enterprise 4 
workstation.  This really pissed off the sysadmins and raised flags 
with the Security folks. 
   
  Third, one of the linux support 
folks here told me they were not supporting ActiveState products because the 
company was in the process of dissolving or being bought or something that 
made service and support continuity questionable.  Can anybody confirm 
this? 
   
  Mark<-|->kraM>>> Tom Schindl <[EMAIL PROTECTED]> 16-Feb-06 
09:20:29 AM >>>
  It's free ;-) http://www.activestate.com/TomJeff Pang 
wrote:>> Why don't you try ActivePerl 
instead of cygwin ?>  
> Is there any free version of 
ActivePerl£¿or how much should I pay for> 
it?thanks.> > - Original Message 
-> *From:* 
Jason J. Czerak > *To:* modperl@perl.apache.org 
> *Sent:* Thursday, February 16, 
2006 4:28 AM> 
*Subject:* mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3> > I have an application that is 
based on Apache::ASP. Apache::ASP> requires Apache2::porting and 
Apache2::compat to be in the startup.pl.> 
> Everything is 
working very well. I some how got mod_perl to build> and running with out a segfault. 
This is good. The issue is when> startup.pl is called, either from 
the command line or within apache> I get this error:> > [Wed Feb 15 13:47:49 2006] 
[error] Can't load> 
'/usr/lib/perl5/site_perl/5.8/cygwin/auto/Apache2/ServerUtil/ServerUtil.dll'> for module Apache2::ServerUtil: 
No such process at> 
/usr/lib/perl5/5.8/cygwin/XSLoader.pm line 68.\n at> 
/usr/lib/perl5/site_perl/5.8/cygwin/Apache2/XSLoader.pm line> 30\nCompilation failed in require 
at /u01/startup.pl line 4.\nBEGIN> failed--compilation aborted at 
/u01/startup.pl line 4.\nCompilation> failed in require at (eval 2) 
line 1.\n> > Suggestions?> > I have also have this some what 
working on native Win32 install of> perl/apache/mod_perl. but apache 
goes into some sort of loop, eating> memory and a kill is required, 
but this is random and only after> some load 
testing.> > -- > Jason Czerak 
([EMAIL PROTECTED] )> > > > > > > 
__> This email transmission and any 
documents, files or previous ema

Re: A question for the newbies

2006-02-16 Thread Chandrakumar Muthaiah


As long as the iffy stuff does not get boiled then it is fine.I meant 
apache. Just as in GPL 3, who knows what apache decided to go with in 
terms of licenses. If it stick to BSD then well then no need to worry 
about IIS or any other web server(But I still think that shouldn't matter).


I think mod_perl should still stick to apache only. M$ people will never 
may realizes what mod_perl would do for them. Just as what happened for 
activestate perl. It never took off that well(I don't see that many 
sites uses activestate perl with IIS though).


I think this thread has dragging endless string of countless matters.

Foo Ji-Haw wrote:

One of my hopes for mod_perl, is that it will evolve into a web
server-independent layer, that can be put on IIS as well (for example). I do
agree that Apache is a much stronger platform than IIS, but it is a bit iffy
to put all the eggs in the same basket...

- Original Message - 
From: "Arne Skjaerholt" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, February 16, 2006 11:11 PM
Subject: Re: A question for the newbies


  

I'm not exactly a newbie anymore, but I came to mod_perl by way of Perl
scripts for the shell. I'd already written some PHP, but when I learned
Perl I saw the error of my ways as it were and realized that PHP really
is quite the makeshift language and that developing in Perl was far more
comfortable (and better for my sanity =).

Also, once I understood what mod_perl was -really- about, I got all the
more excited as it opens up a host of possibilities not available in
PHP.

Arne
:wq



  




Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw



Not to be racist, I am STILL cleaning up codes from an 
outsourced developer, despite their investment in OOP coding. It's not about 
procedural, or OO. It's the programming foundation and learning the best 
practices.
 
So go now and buy a Stas/ Damian (O'Reilly) book! 
:)
 
More importantly, how do you Reflect with 
Perl?

  - Original Message - 
  From: 
  Mark 
  Galbreath 
  To: modperl@perl.apache.org ; [EMAIL PROTECTED] 
  Sent: Thursday, February 16, 2006 10:42 
  PM
  Subject: Re: A question for the 
  newbies
  
  I've been developing apps for business, ecommerce, and government in Java 
  for 6 years.  I developed Web sites with Perl 5.0 CGI in the 
  mid-1990s but never much cared for it outside of its excellent string 
  maniulation, being attracted to the pure OO languages. I spent the last 2 
  years developing in C# ASP.NET and PHP 5.0.  Why did I come back to 
  Perl?
   
  Not voluntarily.  Competition from foreign developers, mostly from 
  India, and companies outsourcing to offshore companies, mostly in India and 
  Indonesia, depressed contracting rates all along the DC - Boston tech corridor 
  for Java programmers.  .NET has not been widely accepted as a replacement 
  for Java or the installed base of VB 6.0 apps and so opportunities are 
  sparse.  I came back to Perl because I was unemployed for 6 months and 
  this was the only decent job (pay the mortgage, college tuition, eat) I could 
  find.  Seems like I have come full-circle over 10 years.
   
  Nevertheless, I was very, very happy to find that in those intervening 10 
  years, Perl became OO with 5.6 and the 5.6 debug version, 5.8.  My perl 
  code is now rife with double colons and reference arrows.  I miss the 
  reference dot notation of Java and other OO languages, however.  Why 
  didn't Larry include that?  And the 'use v. require' issue seems silly to 
  me.  Why not a simple 'import' statement?  And the accessor schema 
  and issues of 'my v. our v. local' and package transparency seems hackneyed to 
  me.  Perhaps 6.0 will address issues like these?  I haven't 
  looked.
   
  Depsite my criticisms, I found that my fears of having to go "backwards" 
  to a procedural language were unfounded.  Like C++, you can write 
  procedural code in perl, but you'll soon be replaced by H1-B contractors if 
  you do.  :-)
   
  Mark<-|->kraM
  Perl does Reflection.>>> Clinton Gormley 
  <[EMAIL PROTECTED]> 16-Feb-06 08:41:02 AM >>>
  It seems to me that a lot of people new to 
  mod_perl and to Perl havejoined this mailing list recently.And 
  this is during a period when popular opinion (amongst those who knowno 
  better) seems to regard Perl as antiquated.I'm delighted that new 
  people are joining.My question is, what prompted you? What made you 
  choose Perl aboveJava/.Net/Python/Ruby etc etcDo you have 
  experience of those languages? What appeals to you aboutPerl? And how do 
  you find your community experience/support compared tothe other languages 
  you know?clint


Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
I think the biggest complaint about Perl, is that it is too symbolic (which
I agreed when I started with Perl myself), making the learning curve steep.
But looking back, I am now much better able to focus on the problem
statement. Perl's TIMWTOWTDI attitude allows me to develop creatively, and
caters to developers of varying depths. Even now I am still learning more
tricks (like closures, tie) to make my work more efficient.


- Original Message - 
From: "Boysenberry Payne" <[EMAIL PROTECTED]>
To: "Clinton Gormley" <[EMAIL PROTECTED]>
Cc: "mod_perl" 
Sent: Thursday, February 16, 2006 11:37 PM
Subject: Re: A question for the newbies


> I guess I'm still considered a mod_perl / perl newbie.  I started
> learning perl 6 months
> ago in anticipation of translating a CMS (Content Management System) I
> wrote in PHP.
>
> I considered Python, and  C++ as alternatives.  C++ was over kill and
> would require
> way too much development just to get going (why reinvent the wheel if I
> don't have to.)
> Python, seemed too similar to PHP for my tastes.  I don't like being
> "forced" to use
> someone else's coding conventions unless I know there are valid reasons
> for it.
> With what I read about Python's white space issues, I thought it might
> be more
> tedious, rather than easier to maintain my 50+ files of code.
>
> Once I started looking into perl I was blown away.  Not only has perl
> been the "swiss
> army knife" of system administration for well over 10 years, but
> mod_perl blows the
> socks off of php.
>
> So for my particular project I couldn't find a better solution.
>
> I think the hardest part about learning perl (coming from developing in
> php for 5 years) was the odd mix of syntax.  It's a mixture of a couple
> of
> languages.  Because I was new to unix and shell syntax it was a bit of
> time before I started to feel comfortable.  Considering 70% of the
> internet
> is run off of *nix flavored servers it's not a bad skill to have.
>
> The benefits of having moved to perl from php are too many to count.
> Just the efficiency of perl's string manipulation cut my code down by
> up-to 50% in some cases.  Perls abilities to be used both procedurally
> as well Object Oriented makes it easy for me to use it which ever way
> is most useful for my task.
>
> Moving from PHP to Perl has been the smartest move I've made.  Our
> code is more secure (we use a proxy system to keep it completely
> separate
> from our client's file server.)  Our system is more stable and
> responsive.
> And my code is 100% easier to maintain.
>
> Although I could have used Python or even stuck with PHP and
> accomplished
> most of what I'm doing, it would take more time, and wouldn't be nearly
> as much
> fun.  In my situation (building a CMS without funding, etc.) I don't
> think I would
> have made it this far without being inspired as I was by perl, mod_perl
> and
> all that they can do.
>
> Did I mention CPAN?
>
> My hat is off to the Perl/mod_perl community for giving such an
> opportunity.
> When in history has it been so bright?
>
> Boysenberry
>
> boysenberrys.com | habitatlife.com | selfgnosis.com
>
> On Feb 16, 2006, at 7:41 AM, Clinton Gormley wrote:
>
> > It seems to me that a lot of people new to mod_perl and to Perl have
> > joined this mailing list recently.
> >
> > And this is during a period when popular opinion (amongst those who
> > know
> > no better) seems to regard Perl as antiquated.
> >
> > I'm delighted that new people are joining.
> >
> > My question is, what prompted you? What made you choose Perl above
> > Java/.Net/Python/Ruby etc etc
> >
> > Do you have experience of those languages? What appeals to you about
> > Perl? And how do you find your community experience/support compared to
> > the other languages you know?
> >
> > clint
> >
> >
> >
> >



Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
>   Just an FYI, Perl 6 will use the dot notation for calling methods.
I did an O'Reilly read on Perl 6. The new syntaxes for variable manipulation
is a bit rough going for sunk-in Perl5 people like me.

But more importantly: when will it ever be ready?!? ( I know there are no
answers to this...)



Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
> I knew that perl could do OO and I couldn't find
> design patterns to go to the next step.
You brought up a good point. I wish someone will write a Design Patterns
book based on Perl...

I've read up on Ruby (to understand the growing interest around it). It
looks Perlish, and it's an interesting alternative to Java. I think the
biggest problem with Ruby and PHP is that none of them have the support that
matches CPAN. In fact, I think CPAN is the biggest advantage for the Perl
community. Java has a huge and growing community library. I must say that
some of the Java-based works are really impressive.



Re: A question for the newbies

2006-02-16 Thread Jonathan Vanasco



On Feb 16, 2006, at 10:18 PM, Foo Ji-Haw wrote:
I think the biggest complaint about Perl, is that it is too  
symbolic (which


I thought that its ugly code - caused in part by no standard coding  
practices, and far too many people pushing 'theres more than one way  
to do it'


On Feb 16, 2006, at 10:02 PM, Foo Ji-Haw wrote:

One of my hopes for mod_perl, is that it will evolve into a web
server-independent layer, that can be put on IIS as well (for  
example). I do
agree that Apache is a much stronger platform than IIS, but it is a  
bit iffy

to put all the eggs in the same basket...


mod_perl is perl embedded in an apache instance - its not just the  
code caching, but being able to script apache as well.  having it  
support multiple platforms would be a bit of a logistics nightmare.


there are a couple of pure-perl webservers out there that would  
probably let you achieve what you want without touching IIS or apache  
and should work cross platform.


Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
> Did you ever try Template Toolkit? I'd say it's probably more popular than
> HTML::Template, and much less restrictive (although you also have more
rope to
> hang yourself too) and can do everything that you mentioned below.
What's the draw of Template Toolkit? I am a heavy user of HTML::Template,
primarily because lets me edit my html templates well on Dreamweaver.



Re: A question for the newbies

2006-02-16 Thread Tyler MacDonald
Foo Ji-Haw <[EMAIL PROTECTED]> wrote:
> > I knew that perl could do OO and I couldn't find
> > design patterns to go to the next step.
> You brought up a good point. I wish someone will write a Design Patterns
> book based on Perl...

This helps:

http://perldesignpatterns.com/perldesignpatterns.html

And this is useful too:

http://www.oreilly.com/catalog/perlbp/

- Tyler




Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
I think people choose templating engines depending on how they want to use
it. For me, HTML::Template is fairly ideal because it encourages me to focus
on the business logic, and abstracts the presentation fairly well. By
allowing only simple tag replacements and loops, it has so far allowed me to
do everything I needed to do on the Web.

There are arguments on how much a templating engine 'should' offer. Some
like the engine to accept 'codelets', others (like me) prefer to keep it as
simple as possible. For this reason I have found it difficult to accept
Mason and Template Toolkit.

- Original Message - 
From: "Jonathan" <[EMAIL PROTECTED]>
To: "Michael Greenish" <[EMAIL PROTECTED]>
Cc: "mod_perl" 
Sent: Friday, February 17, 2006 2:16 AM
Subject: Re: A question for the newbies


>
> On Feb 16, 2006, at 12:48 PM, Michael Greenish wrote:
>
> > What I like about PHP over perl is the ease of
> > variable declaration.  I feel I have to use strict
> > with perl, I would like the ability to not have to put
> > "my" in front of every new variable.
>
> putting my / our before variables is good though.
>
> > is the templating.  I haven't found a template module
> > in perl that rivals Smarty templates in PHP.
>
> Have you looked at Template::Toolkit ? Or Mason ?
>
> > any array element with ".".  Smarty plugin's are
> > great.  They help with creating select drop downs,
> > date drop downs.  I can capitalize, count, strip
> > template variables within smarty
> All the perl templating engines allow that.  there's also FormBuilder
> and other things
>
> > so much more I can do with Smarty than with
> > HTML::Template.  Maybe I just missed all that stuff in
> > the documentation but again, I didn't find it.  Also,
> > it's much easier to include a code snippet in php than
> > in perl.
> HTML::Template is a simple barebones templating system.  its not a
> robust approach like Smarty.  You should be looking at TT and MAson.
>
> > Today, Perl is still my personal favorite language to
> > code for web/unix task.  However at work, I am
> > implementing MVC in PHP 4 much like I did with Perl
> > using the basic OO capabilities available in 4.
> > Interface functions don't help in the web apps I do
> > (small - medium) so I don't see to much need for us to
> > move to 5.  But that's another topic.
> I'd suggest looking at TAL the Template Attribute Language.  The
> specification is on the Zope website (python).  There are perl and
> php implementations (be warned though, the php version is a bit slow,
> so i suggest using a code caching system like eaccelerator with it).
> It's rather nice if you're doing cross-language development, because
> the same templates will work in just about any language.
>
>
>



Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
> On Feb 16, 2006, at 10:18 PM, Foo Ji-Haw wrote:
> > I think the biggest complaint about Perl, is that it is too
> > symbolic (which
>
> I thought that its ugly code - caused in part by no standard coding
> practices, and far too many people pushing 'theres more than one way
> to do it'
I actually favour the multiple-approach offer. Having more than 1 way to
feed your dog does not mean that you have to make the dog suffer. Creativity
and freedom will favour forward evolution. Besides, it makes programming
Perl fun!



Re: A question for the newbies

2006-02-16 Thread Foo Ji-Haw
Thanks for the web links. I already have book by Damian, and it's a good
read.

- Original Message - 
From: "Tyler MacDonald" <[EMAIL PROTECTED]>
To: "Foo Ji-Haw" <[EMAIL PROTECTED]>
Cc: "Michael Greenish" <[EMAIL PROTECTED]>; "mod_perl"

Sent: Friday, February 17, 2006 11:19 AM
Subject: Re: A question for the newbies


> Foo Ji-Haw <[EMAIL PROTECTED]> wrote:
> > > I knew that perl could do OO and I couldn't find
> > > design patterns to go to the next step.
> > You brought up a good point. I wish someone will write a Design Patterns
> > book based on Perl...
>
> This helps:
>
> http://perldesignpatterns.com/perldesignpatterns.html
>
> And this is useful too:
>
> http://www.oreilly.com/catalog/perlbp/
>
> - Tyler
>