Re: Mod_perl tutorials

2000-12-13 Thread Perrin Harkins

Andrew Ho wrote:
> someone else already mentioned, it also doesn't use mod_perl itself. :)

I'm baffled by the insistence of everyone on this thread that a bunch of
static pages like the ones on perl.apache.org should be served by
mod_perl.  Shall I show you all how to change Apache's headers?  We can
say we're running mod_perl/2000 for all the difference it will make.

I'm mostly kidding, but really it doesn't seem very important. 
Generating templated pages off-line is a much simpler (and therefore
easier to build, maintain, mirror, scale, etc.) approach to this kind of
site.  It's not as if we need to take credit cards in the mod_perl store
or something.  (Although that would certainly help with the mod_perl bar
tab at the next ApacheCon.)

- Perrin

(And, no, I don't think we need to have a page running a guestbook or
calculator on the site to demonstrate the power of mod_perl.  If people
need to see a dynamic app so badly, let them click through to imdb.com. 
That site rocks.)



Re: Mod_perl tutorials

2000-12-13 Thread Andrew Ho

Hello,

Just wanted to add to this thread as to the suggestion for a modperl.org.
I agree that this would help mod_perl programmers as a whole. The
"official" mod_perl site is sort of sparse, sort of slow, and on the whole
doesn't inspire confidence in mod_perl as an industrial strength tool. As
someone else already mentioned, it also doesn't use mod_perl itself. :)

I'm thinking somebody should probably take it upon themselves to spearhead
this effort, and perhaps set up another list for potential volunteers to
coordinate. Lots of open source projects are short on useful documentation
and repositories, and having an archive of docs, modules, and real-world
tips sounds like a good idea for mod_perl.

I'd be myself glad to help in any way possible; I'm not too bad of a
mod_perl programmer and don't mind getting my hands dirty with XHTML or
template systems or whatnot.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--




apache registry

2000-12-13 Thread Mark Bathie

Hi all,

I want to run a production and a development version of my mod-perl web
page on the same apache server. The production and development code
lives in separate directories and all code is the same (excluding
database name). Some of the code to generate the web page and to connect
to the back end database is tied up in custom written modules that
I wrote. The module (DB.pm) that connects to my database has the
database name imbedded within, so for example if I were to view the
production web page, mod-perl will happily go away connect to the
production database. Now If I come along and view the development
version of the web page, mod-perl will realise that DB.pm is already
stored in cache and it won't reload the module. So in effect I have
connected to the production database via the development web page.

The problem I see here relates to the production and development
versions having the same name for their database connectivity modules
(DB.pm). I can code around this, but it would be very messy, and I would
like to avoid making code changes and I want my dev and prod source
codes to be the same. Is there any way of storing the module name
distinctivly with apache (other than the default of using the module
name) ? any other suggestions ?

cheers,

mark bathie.





Re: Mod_perl tutorials

2000-12-13 Thread Dave Kaufman


"Ed Park" <[EMAIL PROTECTED]> wrote:
>
> I really like the look of the take23 site as well, and I would be happy as
a
> clam if we could get modperl.org. I'd even be willing to chip in some
> (money/time/effort) to see whether we could get modperl.org.

ok, money is tight and time is short but here's a shred of effort:
modperl.org is registered to Baiju Thakkar <[EMAIL PROTECTED]>, "the
O'Reilly Network's Bureau Chief for Linux, and the founder of linuxmonth.com
and perlmonth.com", according to: http://www.oreillynet.com/pub/au/37  so we
might presume that Mr. Thakkar could be willing to cooperate with an
organized effort to maintain content on the domain.

like i said, i'm kinda new, but from brian's and Robin's remarks, it seems
that committment (and followup) is a bit in short supply.  not surprising,
tho.  we all have a living to make.  plus I've found that most programmers
don't like to "do html" (in quantity), preferring instead to write programs
that do (and coincidentally i've also found that graphic designers who live
in Phoshop don't like to "do" too much html either, resulting in a labor
shortage of "html technologists"), and as a result hard-technology oriented
sites like perl.apache.org tend to look, well like perl.apache.org...

so, towards organizing an effort to propose to Mr. Thakkar for our grand
plans to populate his domain name with relevent, stylish and fresh
mod_perlage, i'm glad to do whatever i can to help.  i personally happen to
*like* doing big sites full of complicated xhtml-compliant cross-browser
html (please don't tell anyone, tho :-))  ...of course i'm not masochistic
and *am* really lazy too, so i prefer to design few and deploy many using
templates, but (a great looking useful) modperl.org would be a site i could
definitely sink my teeth into.

if that means day to day floor-sweeping, email-answering or that brian
mail-bombs me all his, (ahem) "...much random content laying around the
perl.apache.org site, in so many random formats" and i take on the task of
reformatting it to some digestable flavor of xml, "i'm down with it" (...a
term which, my daughter tells me, means what "i'm up to it" used to mean
)

> More than that, though, I think that I would really like to see take23 in
> large measure replace the current perl.apache.org. I remember the first
time
> I looked at perl.apache.org, it was not at all clear to me that I could
> build a fast database-backed web application using mod_perl.
>
[all mention of heretic php technologies snipped]

well, hmmm.  i won't presume to suggest that Matt rename take23.org (again)
to modperl.org (tho that certainly would be a slam dunk) but he has done a
lot of fine work combining plentiful content with great form, and if it
stays fresh, such a site *will* replace perl.apache.org (in traffic and
popularity, even if not in name).

> Anyways, those are my own biases. The final bias is that the advocacy site
> should be hosted someplace _fast_; one of the reasons I initially avoided
> PHP was that their _site_ was dog slow, and I associated that with PHP
being
> dog slow. Anyways, take23 is very fast for now.

i agree.  the site must be hosted professionally or not at all.  having a
slow, unstable or buggy advocacy site would be have of a rather immediate
and opposite effect to advocating mod_perl and wining "mindshare".  of
course this is where cash is the only cure.  (perhaps some secret corporate
benefactor will bless us with colocated hosting in a nice big multi-homed
datacenter).

and, IMO an advocacy site really MUST run on mod_perl, mustn't it?  i mean
really, how many people would believe Apache was a great webserver if
apache.org was hosted on an IIS server?

-dave




Re: cookies cookies cookies

2000-12-13 Thread Greg Stark

John Hurst <[EMAIL PROTECTED]> writes:

> At 01:47 PM 12/12/00, Joshua Chamas wrote:
> Greg Stark wrote:
>  >
>  > How do I reliably remove a cookie from a browser's memory?
> 
> Then Josh said:
>  > What about setting the cookie with an expires date in the past?
>  > $Response->{Cookies}{YourCookie} = {
>  >   Value   => '',
>  >   Expires => -86400,
>  > };

Having actually gone and read the spec, yes you're supposed to set the expire
time to a time in the past. This apparently is true even if the original
cookie had no expire time. Leaving an interesting situation when you aren't
sure you can trust the clock on the browser...

> In most cases, this will only work for a cookie that is an _exact_
> match with the one you wish to expire. This is really hard to do
> if your code didn't write the cookie, since most browsers will use
> the  'path' and 'domain' values to evaluate exactness, but do not
> send those values to you in a request, obscuring them.
> 
> While writing a cookie handling library, I found it necessary to
> trash my cookies file when things got weird, since writing code
> to remove cookies that were the result of bad code seemed a waste
> of time. Once it was stable it worked rather well, assuming that
> calls to the library were consistent about 'path' and 'domain'.

Well this is actually similar to my situation. I'm trying to remove cookies a
browser has picked up from a previous system and put in a new set of cookies.
This means I want to remove cookies regardless of what domain and path they
have. At least in my case there's only a finite set of possibilities.

> Unless you're required to use 'path', I recommend that you explicitly
> set 'path' to '/' on all set cookie operations, and similarly make
> use of a canonical 'domain' value. Then it will be easy to construct
> 'kill cookies'. Otherwise, you'll have to construct logic to determine
> the right 'path' and 'domain' for a particular cookie (yech).

In my experience the Path setting on cookies isn't supported on some browsers.
I suggest having all the pages that share a cookie actually use the same URL
prefix, preferably simply "/". Anything else, even if you're within the spec
won't work on some systems. (Notably some versions of one that shall remain
unnamed but it rhymes with "teevee".)

-- 
greg




Re: Mod_perl tutorials

2000-12-13 Thread Randal L. Schwartz

> "Gunther" == Gunther Birznieks <[EMAIL PROTECTED]> writes:

Gunther> I would be against PPT if StarOffice couldn't read and write those
Gunther> files. But since there is a Linux alternative, I would prefer a slide
Gunther> format stored in the format that slides are made for.

Gunther> Unless of course, anyone has experience with StarOffice being
Gunther> particularly bad at this. In which case, maybe we do have to start
Gunther> with POD or XML for everytthing including the slides.

Well, StarOffice doesn't run on my Mac. :) But when Darwin finalizes,
that'll probably be a moot point, presuming someone compiles
StarOffice for Darwin.

However, a better format for interchange would almost certainly be
something like XML or (horrors) POD.  A text-ish format would make
diffs from CVS make more sense anyway.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> 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: Mod_perl tutorials

2000-12-13 Thread Gunther Birznieks

At 01:55 AM 12/14/2000 +0100, Stas Bekman wrote:
>On Thu, 14 Dec 2000, Gunther Birznieks wrote:
>
> > I guess part of the problem is that PPT is a binary file so if someone
> > checks out of CVS, and modifies slide 3 and another person modifies slide
> > 1, there's really no way of piecing it together again without being 
> annoyed
> > by CVS update.
>
>POD or another text format is definitely a way to go if it's to be
>released as OSS and expected to be maintained by the community.
>
>You can use my hackish Pod::HtmlPsPdf, which tries hard to help generate
>slides. The only caveat it has now, is that the html2ps tool that it uses
>generates not 100% complete PS, so when I run ps2pdf everything is cool,
>but acroread has no option to rotate slides by 90% , so I have to use
>ghostview instead during my classes.
>
>Of course you are welcome to send me patches that improve the slide mode
>of this module.

Well, the thing is that a real slide format like PPT is a bit more 
professional looking than PS/PDF as a format for slides. I'm not saying 
your slides aren't professional looking, but PS/PDF generated slides seem a 
bit plain.

I don't think people care about the look of the slides at the conferences 
you speak at because they tend to be Open Source conferences, but if I took 
the same sort of slides to like SoftwareDevelopment2001 or some place a bit 
more commercial oriented, I think the attendees would feel the slides are a 
bit odd.

My hope is that the core slides themselves would not change often, so 
keeping the slides in a core format like PPT seems OK. They would be broken 
up into module.

Trainers could "brand" the slides by using different master templates 
although it would be part of the license I think that they refer to the 
origin of the slides.

Anyway, I agree with POD or an intermediate format for just about 
everything else. If there was a way to auto generate true PPT slides, then 
I would be more of a proponent of POD as a format for the slides 
themselves. But even then, vector art is useful for diagrams, so I don't 
know how it would work to figure out how to get those into html2ps.

I would be against PPT if StarOffice couldn't read and write those files. 
But since there is a Linux alternative, I would prefer a slide format 
stored in the format that slides are made for.

Unless of course, anyone has experience with StarOffice being particularly 
bad at this. In which case, maybe we do have to start with POD or XML for 
everytthing including the slides.

Later,
Gunther







Re: RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

>FileMan provides a file manager for a web sites through a web browser. It
is a
extensive rewrite of the Apache::AutoIndex.pm module (written by Philippe M.
Chiasson), which in turn was a remake of the autoindex Apache module. FileMan
can provide the same functionality as AutoIndex.pm and can be used to both to
navigate and manage the web site.
>
I noticed from the logs that some people where having problems down loading
the
FileMan tar ball using:
http://www.xorgate.com/
FileMan/FileMan-0.01.tar.gz
I put a link on
http://www.xorgate.com/ in
order to make it easier to down load the file.






Re: [OT] Re: Mod_perl tutorials

2000-12-13 Thread Drew Taylor

Robin Berjon wrote:
> 
> At 23:31 13/12/2000 +0100, Stas Bekman wrote:
> >> A quick check of nsiregistry.com shows that modperlnews.(com|org|net)
> are all
> >> available.
> >
> >Too bad for you/us. You can be sure that when you will go to register any
> >of the above they will be all taken by a reseller. I've mentioned a few
> >times on this list that one should do atomic buys (tm). If you check and
> >don't buy in the same assembly opcode, someone else snoops on your search
> >and will do it for you. The only way to get a domain nowadays is to
> >check-buy atomically. I have enough examples of people who were
> >burned. I've lost stas.com 2.5 years ago, because it took me 1 day to
> >decide that I want to spend $$ on it, well it was taken the next day...
> 
> That's all too true. For certain Network Solutions have a service that
> warns some people that have paid (a lot) when someone checks an address
> that doesn't exist yet. They offered it to one of the companies I worked
> for once so I know for sure. 

Why does this not surprise me? Was it before or after Verisign bought them?

> This doesn't mean that modperlnew will be
> taken within hours but one should be very careful when using registrars'
> whois/dns check tools. If you could want it, buy it immediately. Maybe some
> registrars are not that kind of bandits, but it's hard to know. When the
> revolution comes, we should probably hang most of those nic people ;)

Well, I have registered (through an OpenSRS reseller I might add)
modperlnews.com and .org. If anyone is interested in using them, let me know
and I can get the DNS taken care of. 

Matt, are you interested? If not, maybe I'll start my own advocacy site.  :-P

-- 
Drew Taylor
Software Engineer
OpenAir.com - Making Business a Breeze!
Open a free account today at www.openair.com



Re: (Beginner) Is there a Windows zip download of mod_Perl?

2000-12-13 Thread Robin Berjon

At 21:11 13/12/2000 -0600, Randy Kobes wrote:
>If you have ActivePerl (build 6xx), there's a mod_perl ppm package,
>and some other Apache::* ppms, available at
>   http://theoryx5.uwinnipeg.ca/ppmpackages/
>Choose the mod_perl ppd corresponding to your Apache version.
>You can install these via the ppm utility:
>ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/whatever.ppd
>Also at this location is a sample Apache httpd.conf for
>Win32 mod_perl. 

As someone who has had to run a fairly complex mod_perl site on win32
because I can't use my linux dev box right now I can tell you that that
mod_perl build works very well (thank you so much Randy !). Of course it
doesn't fix limitations inherent to the win32 platform (mostly that you
can't rely on PerlChildInitHandler to do what you'd expect, you'll have to
change that to some other phase if you need it, and alarm doesn't work
(fork does now iirc)). Even better, I've heard from a friend that the
Sablotron people will be releasing a ppm for XML::Sablotron very soon, so
that AxKit will work on win32 too...

When that's done, just install Cygwin's distro, and you might cease to
notice that you're running win32 altogether :)

-- robin b.
Designing pages in HTML is like having sex in a bathtub. If you don't know
anything about sex, it won't do you any good to know a lot about bathtubs.




Re: (Beginner) Is there a Windows zip download of mod_Perl?

2000-12-13 Thread Randy Kobes

On Wed, 13 Dec 2000, Garry Heaton wrote:

> I'm new to mod_Perl and fairly new to Perl, having just begun my journey
> through the desert on the back of Camel Mk3. I've  successfully installed
> and configured Apache 1.3 on Windows 98. Trouble is all the mod_Perl
> downloads are .tar files. Does this mean I can't run it on my Windows
> version of Apache? Please, if anyone can tell me where I can download a .zip
> file I'd be grateful.

If you have ActivePerl (build 6xx), there's a mod_perl ppm package,
and some other Apache::* ppms, available at
   http://theoryx5.uwinnipeg.ca/ppmpackages/
Choose the mod_perl ppd corresponding to your Apache version.
You can install these via the ppm utility:
ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/whatever.ppd
Also at this location is a sample Apache httpd.conf for
Win32 mod_perl. 

Bearing in mind some Win32 peculiarities, the mod_perl docs,
http://perl.apache.org/ (particularly the guide), and 
http://take23.org/ have lots of info to get you started.

best regards,
randy kobes




[OT] Re: Which is good mailing list for perl developers.

2000-12-13 Thread Jeremy Howard

John Michael Soileau wrote:
> Excuse me if I make an error.  This is my first post to this list and not
> sure how it all fits together exactly.   I just joined the news perl list
> you selected to have a look at it and now wonder why you don't put this
> mailing list in the same type of setup.  There may be a way to do it that
I
> don't know about and if there is, info greatly appreciated.  Anyway,  It
is
> very tough keeping up with all of the emails and subjects.  I now see that
I
> should have joined with an email address created just for this list so
that
> I could filter it to a folder somewhere.
> Anyway, why doesn't someone put this list on a news feeder.  It would be
> much easier to maintain from a users point of view.

Setting up a Usenet group is quite a lot of work, and the mod_perl list may
not be high enough volume to justify it.

Using Procmail or Sieve makes it easy to work with mailing lists. Create a
folder for each list, and then create a rule where any message with to/cc
containing '[EMAIL PROTECTED]' is moved to that folder.





Re: Which is good mailing list for perl developers.

2000-12-13 Thread John Michael Soileau

Excuse me if I make an error.  This is my first post to this list and not
sure how it all fits together exactly.   I just joined the news perl list
you selected to have a look at it and now wonder why you don't put this
mailing list in the same type of setup.  There may be a way to do it that I
don't know about and if there is, info greatly appreciated.  Anyway,  It is
very tough keeping up with all of the emails and subjects.  I now see that I
should have joined with an email address created just for this list so that
I could filter it to a folder somewhere.
Anyway, why doesn't someone put this list on a news feeder.  It would be
much easier to maintain from a users point of view.
John M


- Original Message -
From: "Jeremy Howard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 13, 2000 6:22 PM
Subject: Re: Which is good mailing list for perl developers.


> bari wrote:
> > Hi there,
> > i wonder if any one knows which is a good mailing list for perl
developer
> to
> > ask questions. i have a question that how do i represent the contents of
> two
> > dimensional array in CSV in perl.
>
> Try Text::CSV from CPAN.
>
> > And i know this is a modperl mailing list.
> > i jsut wanted to know a good mailing list for perl developers.
> >
> Actually, your best bet is on Usenet, not a mailing list:
>
>   news:comp.lang.perl.misc
>
>




RE: Mod_perl tutorials

2000-12-13 Thread Ed Park

My two cents--

I really like the look of the take23 site as well, and I would be happy as a
clam if we could get modperl.org. I'd even be willing to chip in some
(money/time/effort) to see whether we could get modperl.org.

More than that, though, I think that I would really like to see take23 in
large measure replace the current perl.apache.org. I remember the first time
I looked at perl.apache.org, it was not at all clear to me that I could
build a fast database-backed web application using mod_perl. In contrast,
when you click on PHP from www.apache.org, you are taken directly to a site
that gives you the sense that there is a strong, vibrant community around
php. (BTW, I also like the look and feel of take23 significantly more than
php).

Anyways, those are my own biases. The final bias is that the advocacy site
should be hosted someplace _fast_; one of the reasons I initially avoided
PHP was that their _site_ was dog slow, and I associated that with PHP being
dog slow. Anyways, take23 is very fast for now.

cheers,
Ed




Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Thu, 14 Dec 2000, Gunther Birznieks wrote:

> I guess part of the problem is that PPT is a binary file so if someone 
> checks out of CVS, and modifies slide 3 and another person modifies slide 
> 1, there's really no way of piecing it together again without being annoyed 
> by CVS update.

POD or another text format is definitely a way to go if it's to be
released as OSS and expected to be maintained by the community.

You can use my hackish Pod::HtmlPsPdf, which tries hard to help generate
slides. The only caveat it has now, is that the html2ps tool that it uses
generates not 100% complete PS, so when I run ps2pdf everything is cool,
but acroread has no option to rotate slides by 90% , so I have to use
ghostview instead during my classes.

Of course you are welcome to send me patches that improve the slide mode
of this module.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread brian moseley

On Thu, 14 Dec 2000, Robin Berjon wrote:

> really notice or care. Most of the content is more or
> less static, at least it doesn't change all that often.

yah. i'm sure wml or it's like would work just as nicely for
managing the site. it's just, as everybody on this list
knows, a gigantic pain in the ass to apply a new look to a
large, disorganized sprawl of multiply-formatted OLD
documents.




Re: Article idea: mod_perl + JSP

2000-12-13 Thread brian moseley

On Thu, 14 Dec 2000, Gunther Birznieks wrote:

> So I guess it's a matter of degree. I simply do love
> Perl, but I don't hate Java, I just merely really like
> it. I guess you could say I cheat on my Perl gf all the
> time. :) But unlike in life, I don't think a monogamous
> relationship with my language is actually very healthy.

http://www.polyamory.com/





Re: is morning bug still relevant?

2000-12-13 Thread Jie Gao

On Thu, 14 Dec 2000, Stas Bekman wrote:

> I think that this item from the guide is not relevant anymore. Can I
> kill it? 
> 
> =head3 The Morning Bug
> 
> Relational database server keeps a connection to the client open for a
> limited period of time. Many developers were bitten by so called
> B, when every morning the first users to use the site
> received a C message, but after that everything
> worked fine. The error is caused by C returning a handle
> of the invalid connection (the server closed it because of a timeout),
> and the script was dying on that error. The infamous C method
> was introduced to solve this problem, but still people were being
> bitten by this problem. Another solution was found - to increase the
> timeout parameter when starting the SQL server. Currently I startup
> C server with a script C, so I have modified it to
> use this option:
> 
>   nohup $ledir/mysqld [snipped other options] -O wait_timeout=172800
> 
> 
> (172800 seconds is equal to 48 hours. This change solves the problem.)
> 
> Note that as from version C<0.82>, C implements ping()
> inside the C block.  This means that if the handle has timed out
> it should be reconnected automatically, and avoid the morning bug.

Problem is it is not only relevant, but ping doesn't work in all cases.
I have to cron-kill/start my servers in the morning.

Cheers,


Jie




Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

At 15:23 13/12/2000 -0800, brian moseley wrote:
>On Thu, 14 Dec 2000, Robin Berjon wrote:
>> I didn't mean to target you particularly there brian :)
>
>i know :)

Good, I didn't want any doubt on this :)

>another reason it never got off the ground is that it seemed
>to make a lot of sense to actually use mod_perl to serve the
>site, but from what i've heard, the powers that be on locus
>aren't interested in adding it.

I know. But what I thought at the time (and I think it still holds) was
that perl.apache.org doesn't need to be run under mod_perl. No one except
mod_perl addicts would really notice or care. Most of the content is more
or less static, at least it doesn't change all that often. The scheme I had
in mind was to have the content in some form and templates to make that
content look good, and a server located somewhere else that would commit
changes to perl.apache.org automatically when something changed in the
source. Using mod_perl there would help a lot anyway given that that site
is mirrored in many place and those places don't have mod_perl, or wouldn't
have it configured properly. If a feature really required something totally
dynamic, then I'm sure an external link wouldn't hurt anyone and there'd be
people to offer hosting for it. I would.

>we thought about moving perl.apache.org to rubel, but we
>never actually got around to it. ah well.

That would be cool, but it wouldn't solve the mirroring problem (unless we
killed mirroring of course).

>i'll reiterate a point i've made several times over the last
>year - it would make sense to retire perl.apache.org and
>build a couple new sites, one for developers and one for
>advocacy.

I totally agree with that, and that's one reason I think that take23.org is
a great idea. Afaik Baiju was all for naming one of the site modperl.org
back then so maybe with any luck he still is. I like take23 as a name, but
that's a modperl hacker's private joke. If modperl.org pointed there too,
it certainly wouldn't hurt.

-- robin b.
Change is inevitable except from a vending machine.




Re: Which is good mailing list for perl developers.

2000-12-13 Thread Jeremy Howard

bari wrote:
> Hi there,
> i wonder if any one knows which is a good mailing list for perl developer
to
> ask questions. i have a question that how do i represent the contents of
two
> dimensional array in CSV in perl.

Try Text::CSV from CPAN.

> And i know this is a modperl mailing list.
> i jsut wanted to know a good mailing list for perl developers.
>
Actually, your best bet is on Usenet, not a mailing list:

  news:comp.lang.perl.misc





is morning bug still relevant?

2000-12-13 Thread Stas Bekman


I think that this item from the guide is not relevant anymore. Can I
kill it? 

=head3 The Morning Bug

Relational database server keeps a connection to the client open for a
limited period of time. Many developers were bitten by so called
B, when every morning the first users to use the site
received a C message, but after that everything
worked fine. The error is caused by C returning a handle
of the invalid connection (the server closed it because of a timeout),
and the script was dying on that error. The infamous C method
was introduced to solve this problem, but still people were being
bitten by this problem. Another solution was found - to increase the
timeout parameter when starting the SQL server. Currently I startup
C server with a script C, so I have modified it to
use this option:

  nohup $ledir/mysqld [snipped other options] -O wait_timeout=172800


(172800 seconds is equal to 48 hours. This change solves the problem.)

Note that as from version C<0.82>, C implements ping()
inside the C block.  This means that if the handle has timed out
it should be reconnected automatically, and avoid the morning bug.





_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Gunther Birznieks

At 11:08 AM 12/13/00 -0700, Nathan Torkington wrote:
>J. J. Horner writes:
> > What is the story on these tutorials?  Is it something you can
> > distribute, or did most of it come off of the top your head?
>
>Tutorials seems like a deadend for effort.  I've had zero (0)
>responses to my offer of my "Introduction to mod_perl" tutorial.

Whoops. I am actually very interested. I didn't post earlier for a couple 
reasons.

1) I actually figured I would collect the replies I've seen on the subject 
for a few days, think about all the responses (public and private) and kind 
of summarize them this weekend.

2) I've been going through your slides and thinking about how to turn a 
"monolithic" powerpoint into something that people can act upon 
collaboratively and through CVS.

I guess part of the problem is that PPT is a binary file so if someone 
checks out of CVS, and modifies slide 3 and another person modifies slide 
1, there's really no way of piecing it together again without being annoyed 
by CVS update.

Another mechanism would be to just have a couple people "own" each day of 
slides and take comments from the community to put them in those slides.

PPT is definintely an easier format to code slides in than HTML as I 
suggested earlier would be easier from a CVS perspective. But it's just not 
CVS friendly.

Anyway, it looks like it is a well thought out progenitor to an open source 
"hands on" tutorial. And what it did was that it started me introspecting 
on the logistics of what it will really take to do this as open source and 
how it could be split into chunks of work.

For example, you mentioned that suggested teaching notes should be attached 
to each slide. Maybe it would make sense for the slides to stay fairly 
unchanging but the teaching notes, rather than using PPT notes, should be 
separate POD files that document each slide. So day1-slide1.pod (Although 
this would not stand up very well if a slide gets inserted in the mix!).

Anyway, I hope posting some of these ideas about that project assures you 
I've definitely been interested and thinking about it. I was hoping to 
rather post an initial proposal of how to turn 1 PPT slidebase into an open 
source project first and allow discussion around that rather than just open 
up all these questions.

But perhaps it's better to just open up the questions first (in the open 
source way).

Later,
Gunther

>If nobody's interested in increasing the number of mod_perl
>programmers through tutorials, then the only other option I can think
>of is strategically-placed success stories.
>
>I know that perl.oreilly.com is making a point of collecting Perl
>success stories and is always hungry for more.  They won't convert
>the unwashed there, though.
>
>It'd sure be nice to have a WebTechniques special issue on mod_perl.
>Hint, hint, Randal :-)
>
>Nat

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Web Technology Company
http://www.extropia.com/




Re: Article idea: mod_perl + JSP

2000-12-13 Thread Gunther Birznieks

At 03:03 PM 12/13/00 +, Greg Cope wrote:
>Chris Winters wrote:
> >
> > * Gunther Birznieks ([EMAIL PROTECTED]) [001212 23:53]:
> >
> >
> > > With that said though, I still love Perl.
> >
> > Me too :-) It's frustrating to be doing something in Java that would
> > take a much shorter time in Perl. But then there are things in Java
> > that are simpler than Perl as well.
> >
>
>Appologies if I am butting in - but what you apppear to say here is that
>you are using JAVA because its sex / marketdriods know of it, yet perl
>would be the quicker (and hence cheaper solution ?).  Surley for this
>reason you should use perl and persuade the PBH of the cost benefit here
>?
>
>This has hit on a point - in that may people choose Java over Perl
>because its sexier, which becomes self forfilling, unless we (the perl
>community) persaude people that (mod_)perl is sexy

Well, for me we do Java because I know that there are a couple drivers.

1) I do know of situations were Java is a better/easier tool.
2) For us its not about what is sexy, but what will sell. By the time we 
talk to a company, the debate of Perl vs Java is over and they've already 
spent the money on Java infrastructure or training their guys on Java. 
There is very little commercial benefit for us to tout the benefits of Perl.

One of the things I said earlier is that I think that the time it takes a 
good Java guy to develop something vs a good Perl guy seems to be about 
equal in terms of our real experiences (with Java being a bit longer).

And then when it comes to maintenance (handover) the IT staff of the places 
we deal with are already trained in Java.

So I guess it's a matter of degree. I simply do love Perl, but I don't hate 
Java, I just merely really like it. I guess you could say I cheat on my 
Perl gf all the time. :) But unlike in life, I don't think a monogamous 
relationship with my language is actually very healthy.

I think Chris' views may be similar. When you become a company selling a 
commercial product, it's usually SMEs who don't care. Large corporates (If 
you want to sell your product for over US$100k) will usually want to see 
that it fits within some infrastructural puzzle they've already been 
setting up pieces for or plan to set up the pieces for.

The problem is that all the time you save developing in Perl won't matter 
if your sales team is going to have a hard time selling it because their 
target market will be different.

BTW, I know large corporates and investment banks do use Perl and I've used 
Perl in those environments. But while they enjoyed the benefits of rapid 
development in-house, when they buy a commercial product with a large price 
tag, it raises the profile of the product and many more decision makers 
come in. When this happens, it slows down a sale tremendously because no 
one wants to choose a "bad product" that "doesn't fit in the big picture" 
in front of their peers although they would trust their own in-house 
programmer to quickly write something in Perl.

Corporations are always political that way -- It's not a fault of 
corporations, large societies just tend to form pockets where people of 
like mind flock together and so what is actually normal disagreement among 
people with individual ideas tends to get amplified into the phenomena of 
politics because in a large society people can't know each other well 
enough and it adds a lack of trust to the mix which equals politics.

I may be overloading the meaning of the word politics in this sense. But I 
don't think politics means an organization is bad, it's just how societies 
work when not everyone knows each other and you have people coming and going.

So it depends on whom you want to target. If you target SME's, I guarantee 
you'll scramble to get them to sign off on a 10,000 purchase cuz they watch 
every dime. So you work really really hard to make a sale to an SME to show 
them value. Large corporates also require this, but they require doing it 
to a small committee rather than 1 decision maker. But if it takes 1 month 
to make an SME sale at 10k, and 3 months to make a corporate sale at 100k. 
It's still more efficient to make the corporate sale and always looks good 
on your marketing literature to have a big name than a small name.

Having a big name makes it easier to sell to SMEs too ... "Well, it was 
good enough for God, so as an earthly mortal, you should be able to use 
this product too and we'll even give you a discount." Wink, wink.

Wow, I just realized I am getting really off topic!

Sorry,
 Gunther




Re: Mod_perl tutorials

2000-12-13 Thread brian moseley

On Thu, 14 Dec 2000, Robin Berjon wrote:


> I didn't mean to target you particularly there brian :)

i know :)

> But indeed I bumped into the same problem. Back then my
> todo list included writing Pod::SAX and pod2sax (a pod
> translator that woudl generate SAX events) and an XML
> publishing tool, which would have taken care of turning
> the site into whatever layout might have been needed. Of
> course, in the meantime Matt came up with AxKit and
> something that does more or less what I wanted to do
> with Pod::SAX (neither take care of *all* the
> requirements that I set for myself, but then I didn't
> release anything and it's probably much better to have a
> good part of it than all of it :).

another reason it never got off the ground is that it seemed
to make a lot of sense to actually use mod_perl to serve the
site, but from what i've heard, the powers that be on locus
aren't interested in adding it. checkpoint:

bcm@rubel:~ > HEAD http://perl.apache.org
200 OK
Connection: close
Date: Wed, 13 Dec 2000 23:17:18 GMT
Server: Apache/1.3.15-dev (Unix) tomcat/1.0
Content-Type: text/html
Client-Date: Wed, 13 Dec 2000 23:19:23 GMT
Client-Peer: 63.211.145.10:80

we thought about moving perl.apache.org to rubel, but we
never actually got around to it. ah well.

i'll reiterate a point i've made several times over the last
year - it would make sense to retire perl.apache.org and
build a couple new sites, one for developers and one for
advocacy. take23 seems to fill the latter role well, altho
i'd much rather see it named modperl.org, and the former
could well benefit from being on sourceforge (if they ever
fix their damn login problems, jeez).




[OT] Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

At 23:31 13/12/2000 +0100, Stas Bekman wrote:
>> A quick check of nsiregistry.com shows that modperlnews.(com|org|net)
are all
>> available. 
>
>Too bad for you/us. You can be sure that when you will go to register any
>of the above they will be all taken by a reseller. I've mentioned a few
>times on this list that one should do atomic buys (tm). If you check and
>don't buy in the same assembly opcode, someone else snoops on your search
>and will do it for you. The only way to get a domain nowadays is to
>check-buy atomically. I have enough examples of people who were
>burned. I've lost stas.com 2.5 years ago, because it took me 1 day to
>decide that I want to spend $$ on it, well it was taken the next day...

That's all too true. For certain Network Solutions have a service that
warns some people that have paid (a lot) when someone checks an address
that doesn't exist yet. They offered it to one of the companies I worked
for once so I know for sure. This doesn't mean that modperlnew will be
taken within hours but one should be very careful when using registrars'
whois/dns check tools. If you could want it, buy it immediately. Maybe some
registrars are not that kind of bandits, but it's hard to know. When the
revolution comes, we should probably hang most of those nic people ;)

-- robin b.
Immature poets imitate, mature poets steal. -- T.S. Eliot




Re: RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

At 02:32 PM 12/13/00 -0800
Carlos Ramirez <[EMAIL PROTECTED]>
wrote: 
Looks very nice and useful! Does it use the
default apache icons when the files 
are listed? when do you plan to make it available to the public on CPAN?
docs? 
Yes, it does use the apache icons, just like Apache::AutoIndex.pm.
My intention is to make it available on CPAN.  I have the docs,
test, and etc., however I have never released anything to CPAN before, so
I am sure I am missing something.  I put a copy of the current
package at:

http://www.xorgate.com/FileMan/FileMan-0.01.tar.gz




Re: Driver to access the MS SQL Server database!!!

2000-12-13 Thread Fabrice Scemama

Edmar Edilton da Silva wrote:
> 
> Hi all,
> 
> Please, can anyone tell me what driver I can use to access the MS
> SQL Server  database? I am using the freetds_dbd driver, but It
> doesn't work properly when under heavy workload, the child processes
> of the apache server are aborted. I think that the problem is the
> freetds_dbd driver, because I am wanting to use another driver. If
> someone must help me I will be very appreciated. Thanks...

You can use DBD::Proxy on your un*x web, and DBD::ODBC on a win32
station. But that might cause some overhead. I don't know if
Apache::DBI can be used over DBD::Proxy as it can be over DBD::Sybase.
Give it a try!
Fabrice



Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

At 14:44 13/12/2000 -0800, brian moseley wrote:
>On Wed, 13 Dec 2000, Robin Berjon wrote:
>> Other people seemed to be interested and said they'd
>> take care of doing something but like me I guess they
>> got flooded by work stuff. That's certainly what
>> happened to me :/
>
>that, and the fact that there is so much random content
>laying around the perl.apache.org site, in so many random
>formats. the amount of work it was going to take to retrofit
>all that junk pushed it to the bottom of my priority list.

I didn't mean to target you particularly there brian :) But indeed I bumped
into the same problem. Back then my todo list included writing Pod::SAX and
pod2sax (a pod translator that woudl generate SAX events) and an XML
publishing tool, which would have taken care of turning the site into
whatever layout might have been needed. Of course, in the meantime Matt
came up with AxKit and something that does more or less what I wanted to do
with Pod::SAX (neither take care of *all* the requirements that I set for
myself, but then I didn't release anything and it's probably much better to
have a good part of it than all of it :).

>sure would be nice if a lot of that content made its way to
>take23 in a format that can be more easily managed.

I think Matt requires some XML format (I'd guess DocBook) for take23.
However, translating from well-written pod to DocBook shouldn't be too hard
(especially as I think that Matt's Pod::XML takes care of a lot of that; a
patched Pod::DocBook will do too).

-- robin b.
A computer lets you make more mistakes faster than any other invention,
with the possible exceptions of handguns and Tequila.




Re: RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

Stas Bekman <[EMAIL PROTECTED]>
At 11:11 PM 12/13/00 +0100, you wrote:
>
>On Wed, 13 Dec 2000, George Sanderson wrote:
>
>> At 10:29 PM 12/13/00 +0100, you wrote:
>> Do you want me to email you a *.tar.gz file?
>
>No. Please post the URL.

http://www.xorgate.com/
FileMan/FileMan-0.01.tar.gz

>> >What do you mean by having aspects? Is it a question, or you does the
>> >module provides all the answers?
>> >
>> I set the GID on the files and directories for the users that are
>> authenticated.  Also the
>> GID of the files and directories are check before any significant commands
>> are executed.
>
>Hmm, are you running the server as root? How can you set different GID
>than.
>
No, Apache runs with a common "webuser" ID, just like normal Apache children. 
All I do
is create a new UNIX /etc/group and make webuser a member of that group.
When Apache creates files via FileMan, their UID is  "webuser" (Apache's
PUID).  When a user is authorized, FileMan picks up a GID from an Apache
environment variable for that user.  Since Apache owns the file and is a
member
of the group, it can change the GID of the files.

>> I'm investigating multiple membership and how that might be done. 
>
>May be you should be more explicit in your question? What are you trying
>to accomplish and you don't get it?

This is not really a question.  I am just mumbling.   Currently I have only
two
levels, of access control in FileMan, namely, "admin", and "user".  I think
there is a need for an intermediate level, that is, being able to run all the
commands, but not able to change GIDs of the files.





Re: Mod_perl tutorials

2000-12-13 Thread brian moseley

On Wed, 13 Dec 2000, Robin Berjon wrote:

> Other people seemed to be interested and said they'd
> take care of doing something but like me I guess they
> got flooded by work stuff. That's certainly what
> happened to me :/

that, and the fact that there is so much random content
laying around the perl.apache.org site, in so many random
formats. the amount of work it was going to take to retrofit
all that junk pushed it to the bottom of my priority list.

sure would be nice if a lot of that content made its way to
take23 in a format that can be more easily managed.




Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Drew Taylor wrote:

> Dave Kaufman wrote:
> > 
> > i have to say i really like the look and feel of Matt's take23.org. (and by
> > the way, for those, like me, who can't seem to keep up with reading *every*
> > message on this list... it's take23.ORG.  I went looking for "take23" and i
> > can attest that the cryptic but nicely designed take23.COM, has nothing at
> > all to do with mod_perl on it :-))
> 
> I vaguely remember seeing mockups similar to take23.org as a proposed facelift
> for perl.apache.org. I really liked the design and always wondered why it
> never got used (apart from the manhours to implement the change :-)

There were two designs proposed (those who are on the modperl-site list
have seen both) one from Brian's friend and the other from Robin. None
went into production, till Matt has picked Robin's design, so it fact the
effort wasn't lost...
 
> > i for one would like to see take23.org become "the place" for people
> > deciding if mod_perl is for them, getting started with it, and keeping up
> > with the latest and greatest.  i did turn my nose up at the banners at
> > first, but on second thought, i'm even more *thoroughly* sick of open-source
> > resource sites that are plain (unintesting, visually) and whose content is
> > stale due to a lackluster (volunteer) maintenance.  so, if some ad-income
> > keeps take23 fresh and useful, i think i could be bothered to remember the
> > URL :-)
> 
> A quick check of nsiregistry.com shows that modperlnews.(com|org|net) are all
> available. 

Too bad for you/us. You can be sure that when you will go to register any
of the above they will be all taken by a reseller. I've mentioned a few
times on this list that one should do atomic buys (tm). If you check and
don't buy in the same assembly opcode, someone else snoops on your search
and will do it for you. The only way to get a domain nowadays is to
check-buy atomically. I have enough examples of people who were
burned. I've lost stas.com 2.5 years ago, because it took me 1 day to
decide that I want to spend $$ on it, well it was taken the next day...

> Those domains are definately a little easier to remember than take23.
> What are some other alternatives to take23.org that would be easier on
> the grey matter?

modperl-1.24-01.com or libapreq.com :)

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Problems with Apache::ASP, SSI/Filter, and Redirects

2000-12-13 Thread Mark T. Dame

"Mark T. Dame" wrote:
> 
> We have a strange problem using Redirects with Apache::ASP 2.03.
> 
> With this in the .htaccess file:
> 
> # .asp files for Session state enabled
> 
> SetHandler perl-script
> PerlHandler Apache::ASP
> PerlSetVar CookiePath  /
> PerlSetVar Global  /path/to/asp/directory
> PerlSetVar StateDir /path/to/state/directory
> 
> 
> the following works correctly:
> 
> $Response->Redirect("/index.html");
> 
> However, if we change the .htaccess file to set up ASP to handle SSI:
> 
> # .asp files for Session state enabled
> 
> SetHandler perl-script
> PerlHandler Apache::ASP Apache::SSI
> PerlSetVar Filter On
> PerlSetVar CookiePath  /
> PerlSetVar Global  /path/to/asp/directory
> PerlSetVar StateDir /path/to/state/directory
> 
> 
> it doesn't work.
> 
> Here is the result from each:
> 
> (with first .htaccess file)
> % telnet test.site.com 80
> Trying x.x.x.x...
> Connected to test.site.com.
> Escape character is '^]'.
> get /test.asp HTTP/1.0
> 
> HTTP/1.1 302 Found
> Date: Tue, 12 Dec 2000 17:03:13 GMT
> Server: Apache/1.3.14 (Unix) mod_perl/1.24_01 mod_ssl/2.7.1
> OpenSSL/0.9.5a
> Set-Cookie: session-id=6f995b76dccf9e0a96533aa2aacd3b60; path=/
> Location: /index.html
> Cache-Control: private
> Connection: close
> Content-Type: text/html
> 
> Connection closed by foreign host.
> 
> (with second .htaccess file)
> % telnet test.site.com 80
> Trying x.x.x.x...
> Connected to test.site.com.
> Escape character is '^]'.
> get /test.asp HTTP/1.0
> 
> Connection closed by foreign host.
> 
> We have Apache::Filter version 1.011 and Apache::SSI version 2.13.
> 
> Any ideas?

For anyone who may be interested, upgrading to Apache::ASP 2.07 and
Apache::Filter 1.014 fixed the problem.


-m
-- 
## Mark T. Dame:  mailto:[EMAIL PROTECTED]
## WWW:  http://www.mfm.com/~mdame/
## MFM Communication Software:  http://www.mfm.com/
"The opposed thumb is one of the defining characteristics of our
 species, and mine are strongly opposed to working pointing devices."
  -- Bill Machrone, PC Magazine, Sep. 28, 1993, discussing
  miniature trackballs



Re: RFC: Apache::FileMan

2000-12-13 Thread Stas Bekman


[posting back to the list, I didn't invite this to be a personal thread,
by answering your question. Anaway we will more benefit if it'll be
discussed in public, with enough eye balls all bugs are shallow :) ]

On Wed, 13 Dec 2000, George Sanderson wrote:

> At 10:29 PM 12/13/00 +0100, you wrote:
> >Sounds cool to me!
> >
> >How about posting the url of the source? It's free, right?
> 
> Yes I want it to be on CPAN.  Perhaps you can help me release it.

First let people see it and say what they think. One don't just put things
on CPAN.

> Do you want me to email you a *.tar.gz file?

No. Please post the URL.

> I can make a URL for the file, but do you think this is best way to "put it
> out there"?

It's a temp one, for the interested to download. You don't have to keep it
there for a long.
 
> >What do you mean by having aspects? Is it a question, or you does the
> >module provides all the answers?
> >
> I set the GID on the files and directories for the users that are
> authenticated.  Also the
> GID of the files and directories are check before any significant commands
> are executed.

Hmm, are you running the server as root? How can you set different GID
than.

> I'm investigating multiple membership and how that might be done. 

May be you should be more explicit in your question? What are you trying
to accomplish and you don't get it?

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

At 16:41 13/12/2000 -0500, Drew Taylor wrote:
>I vaguely remember seeing mockups similar to take23.org as a proposed facelift
>for perl.apache.org. I really liked the design and always wondered why it
>never got used (apart from the manhours to implement the change :-)

That's in part my fault. I'm the one who submitted the original design. I
knew that if I didn't push this to the end chances were it wouldn't see the
light of day. Other people seemed to be interested and said they'd take
care of doing something but like me I guess they got flooded by work stuff.
That's certainly what happened to me :/ Anyway, I'm glad that design draft
eventually got used for something thanks to Matt :) My idea of retirement
is slowly starting to be that mythical time when I'll have all the time I
want to publish all those half finished open source things that I have
lying in small bits and pieces on various hard drives ;-)

>A quick check of nsiregistry.com shows that modperlnews.(com|org|net) are all
>available. Those domains are definately a little easier to remember than
>take23. What are some other alternatives to take23.org that would be easier on
>the grey matter?

I quite like the name myself. Somehow my messages seem to take ages to
reach this list but I revealed the meaning of the site a few hours ago
(sorry Matt, I got your message about wanting to keep it truly secret only
afterward). Apparently a few people did get it though.

-- robin b.
By the time they had diminished from 50 to 8, the other dwarves began to
suspect Hungry.




RE: memory leak in win32

2000-12-13 Thread Harshy Wanigasekara

Hmmm.  We're using Apache 1.3.12, perl 5.6.0 and
mod_perl 1.24.  There aren't any huge leaks that
we can't attribute to our custom C++ module.
Maybe try upgrading mod_perl to 1.24?

Otherwise, you'll have to do what we did.
Get a memory checking tool (boundschecker for us)
and spend a few weeks grubbing through the
code.  yechh.

-harshy


> From: Son Chang [mailto:[EMAIL PROTECTED]]
> 
> I saw this fix in one of the mailing list archives and tried 
> it but I'm still 
> getting the memory leak.
> 
> -son
> 
> Quoting Harshy Wanigasekara <[EMAIL PROTECTED]>:
> 
> > Son Chang wrote:
> > >Hi,
> > >
> > >I'm experiencing a memory leak with Apache 1.3.14 with 
> mod_perl 1.23
> > and
> > >perl5.6.0 on Windows NT4.0 and Windows2000.
> > >I've been running some test with a very simple ModPerl 
> handler which
> > just
> > >outputs an HTML page with hello world in it.  Also, I made sure to
> > undef
> > >all
> > >variables that I use.
> > >In general, the child processes grow with each request.
> > >Also, if I set MaxRequestsPerChild to 20 so the child 
> process dies and
> > >restarts after every 20 request, this fixes the problem 
> for the child
> > >processes.  However, with this configuration, there's a memory leak
> > >problem with the parent process.  After the child process dies and
> > >restarts, the parent process grows in size.  This happens 
> every time
> > the
> > >child process dies and restarts.
> > >So with either configuration, I have a memory leak problem.
> > >What can I do to fix this problem?
> > >
> > >-son
> > 
> > Heh, I just unsubscribed from the mailing list,
> > almost missed your question.
> > 
> > We ran into the exact same problem here.
> > 
> > Try:
> > 
> > 
> http://forum.swarthmore.edu/epigone/modperl/groxbloiglim/03AB3
CB11CBED3118A4
> F009027B0C2B16B71A4@HAPPY
> 
> Our fix stops the child process growing, but not the parent.
> 
> -harshy
> 
> -- 
> Harshy Wanigasekara, Software guy, Omneon Video Networks.
> 



RE: memory leak in win32

2000-12-13 Thread Son Chang

I saw this fix in one of the mailing list archives and tried it but I'm still 
getting the memory leak.

-son

Quoting Harshy Wanigasekara <[EMAIL PROTECTED]>:

> Son Chang wrote:
> >Hi,
> >
> >I'm experiencing a memory leak with Apache 1.3.14 with mod_perl 1.23
> and
> >perl5.6.0 on Windows NT4.0 and Windows2000.
> >I've been running some test with a very simple ModPerl handler which
> just
> >outputs an HTML page with hello world in it.  Also, I made sure to
> undef
> >all
> >variables that I use.
> >In general, the child processes grow with each request.
> >Also, if I set MaxRequestsPerChild to 20 so the child process dies and
> >restarts after every 20 request, this fixes the problem for the child
> >processes.  However, with this configuration, there's a memory leak
> >problem with the parent process.  After the child process dies and
> >restarts, the parent process grows in size.  This happens every time
> the
> >child process dies and restarts.
> >So with either configuration, I have a memory leak problem.
> >What can I do to fix this problem?
> >
> >-son
> 
> Heh, I just unsubscribed from the mailing list,
> almost missed your question.
> 
> We ran into the exact same problem here.
> 
> Try:
> 
> http://forum.swarthmore.edu/epigone/modperl/groxbloiglim/03AB3CB11CBED3118A4
> F009027B0C2B16B71A4@HAPPY
> 
> Our fix stops the child process growing, but not the parent.
> 
> -harshy
> 
> -- 
> Harshy Wanigasekara, Software guy, Omneon Video Networks.
> 



Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Dave Kaufman wrote:

> i have to say i really like the look and feel of Matt's take23.org. 

Knowing how humble Robin is I have to say that original it was designed by
Robin Berjon's Knowscape.com designers :) So if you need a good designer
you know now where to find one... they even do mod_perl consulting :)

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Drew Taylor

Dave Kaufman wrote:
> 
> i have to say i really like the look and feel of Matt's take23.org. (and by
> the way, for those, like me, who can't seem to keep up with reading *every*
> message on this list... it's take23.ORG.  I went looking for "take23" and i
> can attest that the cryptic but nicely designed take23.COM, has nothing at
> all to do with mod_perl on it :-))

I vaguely remember seeing mockups similar to take23.org as a proposed facelift
for perl.apache.org. I really liked the design and always wondered why it
never got used (apart from the manhours to implement the change :-)

> i for one would like to see take23.org become "the place" for people
> deciding if mod_perl is for them, getting started with it, and keeping up
> with the latest and greatest.  i did turn my nose up at the banners at
> first, but on second thought, i'm even more *thoroughly* sick of open-source
> resource sites that are plain (unintesting, visually) and whose content is
> stale due to a lackluster (volunteer) maintenance.  so, if some ad-income
> keeps take23 fresh and useful, i think i could be bothered to remember the
> URL :-)

A quick check of nsiregistry.com shows that modperlnews.(com|org|net) are all
available. Those domains are definately a little easier to remember than
take23. What are some other alternatives to take23.org that would be easier on
the grey matter?

-- 
Drew Taylor
Software Engineer
OpenAir.com - Making Business a Breeze!
Open a free account today at www.openair.com



Re: STDOUT issues ...

2000-12-13 Thread Stas Bekman

> I have searched through the archives for an answer and have found a lot of
> discussion, but nothing concrete enough to help ...
> 
> I am using Spreadsheet::WriteExcel to create an Excel doc (hence the name)
> but I keep getting blank documents back.
> 
> The module can write to a file or to STDOUT using '-'. From the archives I
> see that this is similar to an issue with Apache::Magick where the C STDOUT
> (expressed as '-' or '>-') is different from Perl's default STDOUT.
> 
> I have also tried the code from the mod_perl guide:
>   use constant IS_MODPERL => $ENV{MOD_PERL};
>   if (IS_MODPERL) {
> tie *OUT, 'Apache';
>   } else {
> open (OUT, ">-");
>   }

I should kill this example, or provide more explanation. People are just
copy-n-paste examples without thinking too much

> Thanks for any help ... I know I am missing something obvious ...

This item will show up in the next version of the Guide:

=head1 Redirecting STDOUT into a String

Sometimes you have a situation where a black box functions prints the
output to C and you want to get this output into a
string. This is just as valid under mod_perl, where you want the
C to be tied to the C object. So that's where the
C package comes to help. You can re-tie() the STDOUT (or
any other filehandler to a string) by doing a simple select() on the
C object and at the end to re-tie() the STDOUT back to its
original stream:

  my $str;
  my $str_fh = IO::String->new($str);
  my $old_fh = select($str_fh);
  
  # some function that prints to currently selected file handler.
  print_stuff()
  
  # reset default fh to previous value
  select($old_fh) if defined $old_fh;



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: RFC: Apache::FileMan

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, George Sanderson wrote:

> I have created a new module that I called, Apache::FileMan.pm.
> 
> FileMan provides a file manager for a web sites through a web browser. It
> is a extensive rewrite of the Apache::AutoIndex.pm module (written by
> Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
> module. FileMan can provide the same functionality as AutoIndex.pm and can
> be used to both to navigate and manage the web site.

Sounds cool to me!

> Hopefully this module will open a new realm for web service providers (WSP). 
> 
> This is my first Apache module.  I am not quiet sure what others will
> expect me to do, nor how I should provide the code to the mod_perl user
> community for inspection.

How about posting the url of the source? It's free, right?

> The module has some interesting aspects, such as how to provide file
> permissions (security) in a shared environment.

What do you mean by having aspects? Is it a question, or you does the
module provides all the answers?

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Nathan Torkington wrote:

> Stas Bekman writes:
> > It's already taken by the eagle book. And since the URL is hardcoded in
> > the book, you cannot change this.
> 
> True, but you can prominently place a pointer to Eagle book's content
> on the new modperl.com homepage.

Anyway, it's Doug/Lincoln's call :)
 
What about modperl.net?

> > modperl.org is taken by someone else, and it's empty...
> 
> Baiju!

Oh, yeah, Baiju! Baiju, give us back the .org :) :) You have too many cool
domains: perlmonth.com, linuxmonth.com... I wonder whether you have
reserved the modperlmonth.com too :)


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





(Beginner) Is there a Windows zip download of mod_Perl?

2000-12-13 Thread Garry Heaton

I'm new to mod_Perl and fairly new to Perl, having just begun my journey
through the desert on the back of Camel Mk3. I've  successfully installed
and configured Apache 1.3 on Windows 98. Trouble is all the mod_Perl
downloads are .tar files. Does this mean I can't run it on my Windows
version of Apache? Please, if anyone can tell me where I can download a .zip
file I'd be grateful.

Best wishes

Garry Heaton





Re: Mod_perl tutorials

2000-12-13 Thread Dave Kaufman

"Randal L. Schwartz" <[EMAIL PROTECTED]> wrote:
> > "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:
>
> Matt> I'd love to get all of these onto take23, but of course that
requires some
> Matt> sort of effort from someone to gather them together and put together
a web
> Matt> page (in XML!). Volunteers?
>
> They really also belong on perl.apache.org, unless take23 is supposed
> to be taking over that responsibility, or unless take23 will have a
> VERY PROMINENT link on perl.apache.org.

i have to say i really like the look and feel of Matt's take23.org. (and by
the way, for those, like me, who can't seem to keep up with reading *every*
message on this list... it's take23.ORG.  I went looking for "take23" and i
can attest that the cryptic but nicely designed take23.COM, has nothing at
all to do with mod_perl on it :-))

i for one would like to see take23.org become "the place" for people
deciding if mod_perl is for them, getting started with it, and keeping up
with the latest and greatest.  i did turn my nose up at the banners at
first, but on second thought, i'm even more *thoroughly* sick of open-source
resource sites that are plain (unintesting, visually) and whose content is
stale due to a lackluster (volunteer) maintenance.  so, if some ad-income
keeps take23 fresh and useful, i think i could be bothered to remember the
URL :-)

> "take23" doesn't mean anything for me with respect to "mod_perl" by
> the way.  Is there a secret handshake^Wmnemonic that I can remember
> the name of that website?  perl.apache.org was easy to remember.

well, i think it just takes some getting used to.  good names (for
businesses, products, extraction and reporting languages) all tend to seem
arbitrary, the first time you hear them.  but the more arbitrary they are
the better they are associated with *your* thing, in the long run (assuming
the "branding" is successful).  take "pepsi" for instance.  a more arbitrary
and meaningless word would be hard to find, and yet... a brand that's
extrordinary well associated with a particular company's cola (that is, btw,
otherwise indistinguishable form all other companys' colas).

i'm only a relatively recent initiate to mod_perl, and still somewhat
OS-challenged (i.e. windows user) but i think that a large part of the need
for advocacy & mindshare gains is due to a plain-jane hardcore techie image
that mod_perl has, and that's probably due to the way it's currently
presented on the web (at least it was, for me, and i consider myself a
semi-hardcore techie).

XML is a good contrast.  XML is a very techie-only technology, also pretty
hardcore and yet, XML has an extremely sexy web image.  corporations can't
wait to adopt it.  they don't even know what it IS, or what it's FOR, and
they still want it :-)  why?

just take a look at
xml.org
xml.com
xslt.com
xmlsoftware.com
and even the somewhat annoying xmlresources.com

all include advocacy and are carefully targeted toward new users.

heck, even xml.apache.org seems to the first time visitor quite a bit
more polished and complete than  www.apache.org (OR perl.apache.org, for
that matter...)

and contrast the first-impressions these sites make with impression made on
the merly mod_perl curious masses visiting:

modperl.com (about a book, not webserver software)
modperl.org (a non-page placeholder)
modperl.net (this page !~/(mod)|(perl)/)

now, i understand that THE place for mod perl *is* perl.apache.org, but it's
not all that easy to guess (for those who've merely heard that "mod perl" is
something to look into).  the easy-to-guess sites above should take the
uninitiated by the hand, inform them what the technology is all about, where
it stands, who's using it, and guide them down the path to becoming another
advocate!  right?

i hope no one takes offense at this message, because i'm certainly not
trying to belittle the efforts of the webmaster(s) of perl.apache.org
(whomever they may be) and other current modperl resource sites, as i'm sure
they're all heroic and selfless champions for the cause!  but as much as i
dread maketing, sometimes it is a necessary evil...

and i'd certainly be willing to contribute to the efforts of updating and
maintaining take23.org, modperl.* and other advocacy sites along these lines
(although my skills are more along the lines of CGI and MySQL, i don't mind
doing site architecture, or navigation html and graphics for a good cause).

btw, what's exactly is the deal with modperl.org?  perhaps the first order
of bu$iness might be acquiring this domain name (or the right to maintain
the content on it) from it's current owner?

-dave






Re: Mod_perl tutorials

2000-12-13 Thread brian d foy

On 13 Dec 2000, Randal L. Schwartz wrote:

> And admittedly, the perl.org/pm.org/perl.com split is never clear to
> most visitors (or even to the people who maintain it).  I'm just
> afraid of another arbitrary demarcation like this.

i assume you mean the www hosts since you are talking about web sites.
the domains themselves do a lto more than jsut web thingys.

it's very clear to me and i think it is clear to mjd, and i wouldn't say
that it is unclear to most visitors.  some visitors will always be
confused about a website no matter what it is or how much you tell them
about it. :) 

the trouble is what people think a particular website should do and what
it actually does. 


--
brian d foy  <[EMAIL PROTECTED]>
Director of Technology, Smith Renaud, Inc.
875 Avenue of the Americas, 2510, New York, NY  10001
V: (212) 239-8985





RE: memory leak in win32

2000-12-13 Thread Harshy Wanigasekara

Son Chang wrote:
>Hi,
>
>I'm experiencing a memory leak with Apache 1.3.14 with mod_perl 1.23 and
>perl5.6.0 on Windows NT4.0 and Windows2000.
>I've been running some test with a very simple ModPerl handler which just
>outputs an HTML page with hello world in it.  Also, I made sure to undef
>all
>variables that I use.
>In general, the child processes grow with each request.
>Also, if I set MaxRequestsPerChild to 20 so the child process dies and
>restarts after every 20 request, this fixes the problem for the child
>processes.  However, with this configuration, there's a memory leak
>problem with the parent process.  After the child process dies and
>restarts, the parent process grows in size.  This happens every time the
>child process dies and restarts.
>So with either configuration, I have a memory leak problem.
>What can I do to fix this problem?
>
>-son

Heh, I just unsubscribed from the mailing list,
almost missed your question.

We ran into the exact same problem here.

Try:

http://forum.swarthmore.edu/epigone/modperl/groxbloiglim/03AB3CB11CBED3118A4
F009027B0C2B16B71A4@HAPPY

Our fix stops the child process growing, but not the parent.

-harshy

-- 
Harshy Wanigasekara, Software guy, Omneon Video Networks.



RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

I have created a new module that I called, Apache::FileMan.pm.

FileMan provides a file manager for a web sites through a web browser. It
is a extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. FileMan can provide the same functionality as AutoIndex.pm and can
be used to both to navigate and manage the web site.

Hopefully this module will open a new realm for web service providers (WSP). 

This is my first Apache module.  I am not quiet sure what others will
expect me to do, nor how I should provide the code to the mod_perl user
community for inspection.

The module has some interesting aspects, such as how to provide file
permissions (security) in a shared environment.





Driver to access the MS SQL Server database!!!

2000-12-13 Thread Edmar Edilton da Silva


    Hi all,
    Please, can anyone tell me what driver I can use
to access the MS SQL Server  database? I am using the freetds_dbd
driver, but It doesn't work properly when under heavy workload, the child
processes of the apache server are aborted. I think that the problem is
the freetds_dbd driver, because I am wanting to use another driver. If
someone must help me I will be very appreciated. Thanks... 


    Edmar Edilton da Silva
    Bacharel em Ciência da Computacão - UFV
  Mestrando em Ciência da Computacão - UNICAMP

 


STDOUT issues ...

2000-12-13 Thread Homsher, Dave V.

Hi all ...

I have searched through the archives for an answer and have found a lot of
discussion, but nothing concrete enough to help ...

I am using Spreadsheet::WriteExcel to create an Excel doc (hence the name)
but I keep getting blank documents back.

The module can write to a file or to STDOUT using '-'. From the archives I
see that this is similar to an issue with Apache::Magick where the C STDOUT
(expressed as '-' or '>-') is different from Perl's default STDOUT.

I have also tried the code from the mod_perl guide:
use constant IS_MODPERL => $ENV{MOD_PERL};
if (IS_MODPERL) {
  tie *OUT, 'Apache';
} else {
  open (OUT, ">-");
}

I'm probably not using this as intended, though (an example would help).
Does this go before the handler sub, or in it ???

Here is the code below (BTW it does work as a plain cgi script w/o the
mod_perl additions of course). You can see the different ways I have been
trying to do this ...

package Planning_xls;
# File: /usr/local/apache/lib/perl/Planning_xls.pm

use strict;
use Apache::Constants qw(:common REDIRECT HTTP_SERVICE_UNAVAILABLE);
use Spreadsheet::WriteExcel;

sub handler {
my $r = shift;

use constant IS_MODPERL => $ENV{MOD_PERL};
if (IS_MODPERL) {
  tie *OUT, 'Apache';
} else {
  open (OUT, ">-");
}

#   *STDOUT = *r{IO};
#   tie *STDOUT => Apache;
#   tie *STDOUT => $r;
#   tie *STDOUT => 'Apache';
#   open(STDOUT, ">-");
#   untie *STDOUT;
#   open(STDOUT, ">&=" . fileno($fh));


$r->content_type('application/vnd.ms-excel');
#   $r->content_type('text/html');
$r->send_http_header;

my $workbook = Spreadsheet::WriteExcel->new("-");
#   my $workbook = Spreadsheet::WriteExcel->new(STDOUT);

my $worksheet   = $workbook->addworksheet("test");
my $format  = $workbook->addformat();

$format->set_bold();
$format->set_color('red');
$format->set_align('center');

$worksheet->write(0, 0, 1);
$worksheet->write(1, 1, 1.2345);
$worksheet->write(2, 2, "formatted", $format);

$workbook->close();

return OK;

}
1;
__END__

Thanks for any help ... I know I am missing something obvious ...

Dave Homsher
Webmaster
MACtac IT

 "The tree of liberty must be watered
 periodically with the blood of tyrants and patriots alike.
 ... Resistance to tyrants is obedience to God."
 - Thomas Jefferson



Re: Mod_perl tutorials

2000-12-13 Thread Nathan Torkington

Stas Bekman writes:
> It's already taken by the eagle book. And since the URL is hardcoded in
> the book, you cannot change this.

True, but you can prominently place a pointer to Eagle book's content
on the new modperl.com homepage.

> modperl.org is taken by someone else, and it's empty...

Baiju!

Nat



Re: Re[2]: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Nathan Torkington wrote:

> Allen Wilson writes:
> > I for one...would like to see some tutorials. I am just starting to
> > use mod_perl and it hard getting a firm start.
> 
> http://prometheus.frii.com/~gnat/mod_perl is the only freely-available
> tutorial that I know of.  There are a few (ahem) bugs in the code, but
> the tutorial is still useful (IMHO).  I'd appreciate any feedback you
> have.

My slides/handouts from the last 5 conferences are all available as well
at http://stason.org/talks/, but since they are based on the guide, you
better head off to read the guide in first place, since it's most up to
date.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Nathan Torkington wrote:

> Matt Sergeant writes:
> > Basically I see the distinction as news/community vs the official home
> > page. The same as php3.org vs phpbuilder.
> 
> I think modperl.com should be the webpage that shows modperl to be an
> active vibrant technology.  In other words, I think take23 should
> really be on modperl.com.  The domain name is the killer.

It's already taken by the eagle book. And since the URL is hardcoded in
the book, you cannot change this.

Our book's site is modperlbook.org... how original :)

modperl.org is taken by someone else, and it's empty...

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





RE: Mod_perl tutorials

2000-12-13 Thread Geoffrey Young



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 13, 2000 3:01 PM
> To: Matt Sergeant
> Cc: Jay Jacobs; [EMAIL PROTECTED]
> Subject: Re: Mod_perl tutorials
> 
> /me scuffles off to register no-args.org now... :)
> 
  I'm partial to to rawargs.org myself - it's more visceral...

;)

--Geoff



Re: Mod_perl tutorials

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, Matt Sergeant wrote:

> On 13 Dec 2000, (Randal L. Schwartz) wrote:
> 
> > They really also belong on perl.apache.org, unless take23 is supposed
> > to be taking over that responsibility, or unless take23 will have a
> > VERY PROMINENT link on perl.apache.org.
> 
> I wouldn't say "taken over" but I can say you'll see more frequent updates
> on take23, and it'll always be prettier :-)

Come'n guys, do you read cvs commits? I've linked to take23 from
perl.apache.org on the same day the site was announced -- it's the second
link in the TOC:

 Download 
  => News and Resources for the mod_perl world 
 Perl Apache Modules 
 Help with Perl Apache Modules Wanted 
 Books and Documentation 
 

Definitely one shouldn't discourage Matt from doing what he's doing, since
people promised to take over perl.apache.org for years, and nobody
committed to complete even something was started. May be Matt will want to
use some CNAME, like take23.perl.apache.org -- this is a good idea, but
otherwise, the link is there.


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Help me beat Java.

2000-12-13 Thread G.W. Haywood

Hi Stas,

On Wed, 13 Dec 2000, Stas Bekman wrote:
> On Wed, 13 Dec 2000, G.W. Haywood wrote:
> > There's a Perl to C translator but I don't tink you want to go there.
> 
> It doesn't make the code run faster. It only helps if you want to hide the
> source code (to make it harder to get to the source code :) 
> 
> and it won't work under mod_perl anyway.


I know.  I _said_ he didn't want to go there...:)

73,
Ged.





Re: Which is good mailing list for perl developers.

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, bari wrote:

> Hi there,
> i wonder if any one knows which is a good mailing list for perl developer to
> ask questions. i have a question that how do i represent the contents of two
> dimensional array in CSV in perl. And i know this is a modperl mailing list.
> i jsut wanted to know a good mailing list for perl developers.

You should try http://perlmonks.org/ -- I don't know how good they are,
but why don't you give a try.

> 
>   Thank You,
> 
> - Bari
> 
> 



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Nathan Torkington

Matt Sergeant writes:
> Basically I see the distinction as news/community vs the official home
> page. The same as php3.org vs phpbuilder.

I think modperl.com should be the webpage that shows modperl to be an
active vibrant technology.  In other words, I think take23 should
really be on modperl.com.  The domain name is the killer.

Nat



Re: Help me beat Java.

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, G.W. Haywood wrote:

> Hi all,
> 
> On Wed, 13 Dec 2000, Vivek Khera wrote:
> 
> > j> 3. Is there a way to precomplie perl to machine code to
> > 
> > Don't think so, but there could be.
> 
> There's a Perl to C translator but I don't tink you want to go there.

It doesn't make the code run faster. It only helps if you want to hide the
source code (to make it harder to get to the source code :) 

and it won't work under mod_perl anyway.

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

>Well Doug likes the site, and I'd assume someone is going to add a link
>fairly shortly to perl.apache.org.

There already is, I think Stas added it. It's under "News and Resources for
the mod_perl world" in the toc.

>> If you want traffic on your site, pick a way for people to remember it
>> when they walk into an internet cafe or when they are talking to
>> others in the hall.  Clever secret names suck, until you're the first
>> hit in google. :)
>
>Suggestions for ways to help that would be most appreciated.

You can get into dmoz by submitting your site to the editor of the
appropriate section and that will already get you into google as it uses
it. Otherwise, well basically the best way to get google to list you well
is to have a lot of people link to you with their sites contaning
perl/mod_perl/website building info (and to submit all those sites + yours
to google so that it'll visit them).

-- robin b.
He who laughs last thinks slowest. 




Re: Mod_perl tutorials

2000-12-13 Thread Randal L. Schwartz

> "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:

Matt> Suggestions for ways to help that would be most appreciated.

Make a link on the left on the home page "why the name take23?".
Then clever people like me can read it, and remember the name
much better.

/me scuffles off to register no-args.org now... :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> 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: Which is good mailing list for perl developers.

2000-12-13 Thread Alexander Farber (EED)

bari wrote:
> i jsut wanted to know a good mailing list for perl developers.

http://listserv.ActiveState.com/pipermail/perl-win32-users/



Re: Mod_perl tutorials

2000-12-13 Thread Matt Sergeant

On 13 Dec 2000, (Randal L. Schwartz) wrote:

> Well, then, I'd ask for the perl.apache.org folks to "bless" the
> take23.org site by linking to it prominently, along with a context
> so that visitors know why some things are on perl.apache.org and
> others are on take23.org.

Well Doug likes the site, and I'd assume someone is going to add a link
fairly shortly to perl.apache.org.

Basically I see the distinction as news/community vs the official home
page. The same as php3.org vs phpbuilder.

> If you want traffic on your site, pick a way for people to remember it
> when they walk into an internet cafe or when they are talking to
> others in the hall.  Clever secret names suck, until you're the first
> hit in google. :)

Suggestions for ways to help that would be most appreciated.

-- 


/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\




Re: Mod_perl tutorials

2000-12-13 Thread Ken

I am also interested in mod_perl tutorials. If someone is taking
names and email addresses, add mine. 
Make it Ken Creason, [EMAIL PROTECTED]

Thanks,
_Ken
Napa Valley Linux Users Group
Napa Valley Perl Mongers



At 01:41 PM 12/13/00 -0500, you wrote:
>On Wed, Dec 13, 2000 at 11:08:44AM -0700, Nathan Torkington wrote:
>> J. J. Horner writes:
>> > What is the story on these tutorials?  Is it something you can
>> > distribute, or did most of it come off of the top your head?
>> 
>> Tutorials seems like a deadend for effort.  I've had zero (0)
>> responses to my offer of my "Introduction to mod_perl" tutorial.
>> 
>
>I'm interested.  Send me a link, or tell me more information.
>
>If it is going to cost me, it will have to wait until after Christmas.
>My Christmas budge was depleted when I bought a new laptop, a new server, 
>and a french horn.
>
>JJ
>-- 
>J. J. Horner
>[EMAIL PROTECTED]
>
>Apache, Perl, mod_perl, Web security, Linux
>




Re: Mod_perl tutorials

2000-12-13 Thread Randal L. Schwartz

> "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:

Matt> On 13 Dec 2000, (Randal L. Schwartz) wrote:
>> They really also belong on perl.apache.org, unless take23 is supposed
>> to be taking over that responsibility, or unless take23 will have a
>> VERY PROMINENT link on perl.apache.org.

Matt> I wouldn't say "taken over" but I can say you'll see more frequent updates
Matt> on take23, and it'll always be prettier :-)

Well, then, I'd ask for the perl.apache.org folks to "bless" the
take23.org site by linking to it prominently, along with a context
so that visitors know why some things are on perl.apache.org and
others are on take23.org.

And admittedly, the perl.org/pm.org/perl.com split is never clear to
most visitors (or even to the people who maintain it).  I'm just
afraid of another arbitrary demarcation like this.

Matt> It will always be at modperl.sergeant.org too, but there's no secret
Matt> mnemonic. Well there is a connection to mod_perl (I wouldn't have just
Matt> plucked a name out of mid air), but I'm not going to just reveal it, even
Matt> though someone has already figured it out. Maybe one day it will become an
Matt> FAQ.

Matt> For now, try a bookmark.

That doesn't help me remember it when I'm on a strange browser, or
trying to tell some people in front of a room.  But now that I know
the secret mnemonic, it'll help.

If you want traffic on your site, pick a way for people to remember it
when they walk into an internet cafe or when they are talking to
others in the hall.  Clever secret names suck, until you're the first
hit in google. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> 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!



ANNOUCE: HTML::Mason 0.895

2000-12-13 Thread Jonathan Swartz

The URL

http://www.masonhq.com/download/HTML-Mason-0.895.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JS/JSWARTZ/HTML-Mason-0.895.tar.gz
  size: 257835 bytes
   md5: ac1804eca31bb3c1f563e727dff725e5

This release fixes a slew of bugs and documentation glitches. It also
introduces a few mild incompatibilities that we felt would ultimately make a
cleaner 1.0 system.

Our plan is to continue with this branch until there are no known fixable
bugs, then release the final result as 1.0. I encourage everyone currently
using 0.8x to upgrade to this release and report any bugs / documentation
errors to the user's list.

Cheers
Jon

Changes in 0.895:
  - ** Removed ApacheHandler from Mason.pm. It is now necessary to
  explicitly 'use' the HTML::Mason::ApacheHandler module in your
  handler.pl file (or elsewhere).  This fixes an intermittent
  args_method bug and cleans up Mason.pod.
  - ** Changed $m->caller_args to return a hash reference in scalar
  context and a list/hash in list context. Older calls expecting a list
  reference will need to be changed.
  - Fixed Mason to work under Perl's tainting mode again.  Thanks to John
  Tobey for pointing us in the right direction.
  - Modified the definition of "next component" to depend on the current
  component, not merely the number of times $m->call_next has been
  called.  This allows $m->fetch_next to work as documented. Also
  added $m->fetch_next_all, which returns the rest of the wrapper chain.
  - Fixed bug with ../.. in component paths.  Versions 0.88 and 0.89
  would create multiple object files for a single component and would
  allow any filename to be treated as an internal component.  This was
  _not_ exploitable externally via Apache, however.  (reported by Pascal
  Eeftinck)
  - Implemented $m->top_comp and $m->top_args, and fixed documentation
  for $m->callers(-1).  (suggested by Kees Vonk)
  - Added full line comments to <%args> sections. (suggested by Matthew
  Lewinski)
  - Revamped test harness system with HTML::Mason::Tests, greatly
  simplifying the new test creation process.
  - Implemented partial compliance with Apache::Filter; Mason can now be
  used as a pre-filter but not yet as a post-filter. i.e. Configurations
  like "PerlHandler HTML::Mason Apache::Compress" will work.
  - Implemented logging of NOT FOUND errors to match plain Apache. Also
  issue special warnings for Mason-specific causes of NOT FOUND.
  - Documented Mason request object's aborted and aborted_value methods.
  - Documented the fact that any variable declared in the <%args>
  section must be a valid Perl variable name.  The parser will now give
  an error if it encounters an invalid name (such as $foo.x).
  - Eliminated upgrade of Apache request object to Apache::Request class
  if this were done previously.  (submitted by Shevek)
  - Removed FAQ from distribution. Users should seek out the most
  current FAQ, now maintained by Kwindla Kramer, on the web.
  - Fixed bug where an attempt to escape a substitution that contained a
  function operating on a list (like sort or map) ended up appending the
  escape flag characters to the list being operated on.
  - Fixed the test 08-ah to work with CGI versions >= 3.0. (reported by
  Alexei V. Barantsev)
  - Fixed a problem with the parser when running with a locale that used
  a comma as the decimal separator instead of a period. (reported by
  Louis-David Mitterrand)
  - Clarified the 'u' escape flag in docs.
  - Removed use of $r->finfo in Apachehandler.pm, which causes random
  core dumps in certain versions of mod_perl.
  - Updated eg/session_handler.pl code to match Apache::Session 1.50+.
  - Fixed various problems with debug files.
  - Fixed a bug sometimes seen when the parser failed to parse a
  component called by another component.
  - Fixed a bug that prevented the $m->cache_self method from returning
  anything.
  - Fixed documentation regarding 'months' and 'years' units in
  expire_in cache flag.
  - Fixed bug in HTML/Mason/Component/Subcomponent.pm create_time
  method.  (reported by Caleb Crome)
  - Fixed bug where Mason would try to escape undefined values in a
  substitution with an escape flag.  (submitted by Denis Shaposhnikov)




[OT] Re: Which is good mailing list for perl developers.

2000-12-13 Thread Matt Sergeant

On Wed, 13 Dec 2000, bari wrote:

> Hi there,
> i wonder if any one knows which is a good mailing list for perl developer to
> ask questions. i have a question that how do i represent the contents of two
> dimensional array in CSV in perl. And i know this is a modperl mailing list.
> i jsut wanted to know a good mailing list for perl developers.

It seems pretty dead, but there are still subscribers, on
[EMAIL PROTECTED] Send a mail to
[EMAIL PROTECTED] to subscribe. So far most questions
asked there have been answered pretty well.

-- 


/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\




Re: Mod_perl tutorials

2000-12-13 Thread Matt Sergeant

On 13 Dec 2000, (Randal L. Schwartz) wrote:

> They really also belong on perl.apache.org, unless take23 is supposed
> to be taking over that responsibility, or unless take23 will have a
> VERY PROMINENT link on perl.apache.org.

I wouldn't say "taken over" but I can say you'll see more frequent updates
on take23, and it'll always be prettier :-)

> "take23" doesn't mean anything for me with respect to "mod_perl" by
> the way.  Is there a secret handshake^Wmnemonic that I can remember
> the name of that website?  perl.apache.org was easy to remember.

It will always be at modperl.sergeant.org too, but there's no secret
mnemonic. Well there is a connection to mod_perl (I wouldn't have just
plucked a name out of mid air), but I'm not going to just reveal it, even
though someone has already figured it out. Maybe one day it will become an
FAQ.

For now, try a bookmark.

-- 


/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\




Re: Mod_perl tutorials

2000-12-13 Thread Robin Berjon

At 11:17 13/12/2000 -0800, Randal L. Schwartz wrote:
>"take23" doesn't mean anything for me with respect to "mod_perl" by
>the way.  Is there a secret handshake^Wmnemonic that I can remember
>the name of that website?  perl.apache.org was easy to remember.

Spend a few hours trying to figure out how to write a custom directive
through mod_perl (eagle chap 8 iirc).

-- robin b.
Oops. My Brain just hit a bad sector. 




Re: Mod_perl tutorials

2000-12-13 Thread Randal L. Schwartz

> "Matt" == Matt Sergeant <[EMAIL PROTECTED]> writes:

Matt> On Wed, 13 Dec 2000, Jay Jacobs wrote:
>> 
>> 
>> 
>> I've seen a few folks say "my tuturial is at http://xxx", etc.  But it
>> would be great if someone could put them all in a single place (take23?)
>> with a blurb about each.
>> 
>> I've been trying to keep the email with the links to the various
>> presentations and tutorials for the moment when I have time to look at
>> them, but it'd be great to have a single location that I might have in my
>> memory when time is available.

Matt> I'd love to get all of these onto take23, but of course that requires some
Matt> sort of effort from someone to gather them together and put together a web
Matt> page (in XML!). Volunteers?

They really also belong on perl.apache.org, unless take23 is supposed
to be taking over that responsibility, or unless take23 will have a
VERY PROMINENT link on perl.apache.org.

"take23" doesn't mean anything for me with respect to "mod_perl" by
the way.  Is there a secret handshake^Wmnemonic that I can remember
the name of that website?  perl.apache.org was easy to remember.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> 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!



Which is good mailing list for perl developers.

2000-12-13 Thread bari

Hi there,
i wonder if any one knows which is a good mailing list for perl developer to
ask questions. i have a question that how do i represent the contents of two
dimensional array in CSV in perl. And i know this is a modperl mailing list.
i jsut wanted to know a good mailing list for perl developers.

  Thank You,

- Bari




Re: memory leak in win32

2000-12-13 Thread Buddy Lee Haystack

I've had memory leak issues on Linux [so I don't know how appropriate this advise is 
for Windows], and the fix that worked the best for others & myself was to actually 
kill the apache server & restart it. The process takes seconds, and can be automated & 
scheduled for off-hours. If you search the archives you'll even find a log-rotation 
program that someone was kind enough to post. Just change it to suit your needs.


Son Chang wrote:
> 
> Hi,
> 
> I'm experiencing a memory leak with Apache 1.3.14 with mod_perl 1.23 and
> perl5.6.0 on Windows NT4.0 and Windows2000.
> I've been running some test with a very simple ModPerl handler which just
> outputs an HTML page with hello world in it.  Also, I made sure to undef all
> variables that I use.
> In general, the child processes grow with each request.
> Also, if I set MaxRequestsPerChild to 20 so the child process dies and
> restarts after every 20 request, this fixes the problem for the child
> processes.  However, with this configuration, there's a memory leak
> problem with the parent process.  After the child process dies and
> restarts, the parent process grows in size.  This happens every time the
> child process dies and restarts.
> So with either configuration, I have a memory leak problem.
> What can I do to fix this problem?
> 
> -son



Re: Mod_perl tutorials

2000-12-13 Thread Matt Sergeant

On Wed, 13 Dec 2000, Jay Jacobs wrote:

>
> 
>
> I've seen a few folks say "my tuturial is at http://xxx", etc.  But it
> would be great if someone could put them all in a single place (take23?)
> with a blurb about each.
>
> I've been trying to keep the email with the links to the various
> presentations and tutorials for the moment when I have time to look at
> them, but it'd be great to have a single location that I might have in my
> memory when time is available.

I'd love to get all of these onto take23, but of course that requires some
sort of effort from someone to gather them together and put together a web
page (in XML!). Volunteers?

-- 


/||** Director and CTO **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** Personal Web Site: http://sergeant.org/ **
 \\//
 //\\
//  \\




Re: Mod_perl tutorials

2000-12-13 Thread J. J. Horner

On Wed, Dec 13, 2000 at 11:08:44AM -0700, Nathan Torkington wrote:
> J. J. Horner writes:
> > What is the story on these tutorials?  Is it something you can
> > distribute, or did most of it come off of the top your head?
> 
> Tutorials seems like a deadend for effort.  I've had zero (0)
> responses to my offer of my "Introduction to mod_perl" tutorial.
> 

I'm interested.  Send me a link, or tell me more information.

If it is going to cost me, it will have to wait until after Christmas.
My Christmas budge was depleted when I bought a new laptop, a new server, 
and a french horn.

JJ
-- 
J. J. Horner
[EMAIL PROTECTED]

Apache, Perl, mod_perl, Web security, Linux


 PGP signature


Re: Mod_perl tutorials

2000-12-13 Thread Jay Jacobs




I've seen a few folks say "my tuturial is at http://xxx", etc.  But it
would be great if someone could put them all in a single place (take23?)
with a blurb about each.

I've been trying to keep the email with the links to the various
presentations and tutorials for the moment when I have time to look at
them, but it'd be great to have a single location that I might have in my
memory when time is available.

Jay





RE: Has anyone built mob_perl on SuSE 7 or RH 7???

2000-12-13 Thread Geoffrey Young



> -Original Message-
> From: Carson, Chuck [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 13, 2000 1:25 PM
> To: '[EMAIL PROTECTED]'
> Subject: Has anyone built mob_perl on SuSE 7 or RH 7???
> 
> 
> 
> I have been trying to no end to get mod_perl-1.24 to compile with
> Apache-1.3.14 on SuSE 7.0 and Red Hat 7.0. Here are some 
> procedures I have
> tried. Note, each time I have started with freshly upacked tarballs of
> mod_perl-1.24 and apache-1.3.14.
> 
[snip]
> * WARNING *
> 
>   Apache Version 1.3.0 required, aborting...
> 
> * WARNING *

you need mod_perl 1.24_01 to build against Apache 1.3.14 (or you need to
hack a few things) - the archives should have told you that :)

some people around here have reported problems with the gcc that shipped
with RH7.0 - if you continue to have problems, maybe try downgrading to the
gcc from 6.2 (I'm still on 6.2, so I haven't tried it yet)

HTH

--Geoff

[snip]



Re: Re[2]: Mod_perl tutorials

2000-12-13 Thread Nathan Torkington

Allen Wilson writes:
> I for one...would like to see some tutorials. I am just starting to
> use mod_perl and it hard getting a firm start.

http://prometheus.frii.com/~gnat/mod_perl is the only freely-available
tutorial that I know of.  There are a few (ahem) bugs in the code, but
the tutorial is still useful (IMHO).  I'd appreciate any feedback you
have.

Nat



Re: Mod_perl tutorials

2000-12-13 Thread Greg Cope

Nathan Torkington wrote:
> 
> J. J. Horner writes:
> > What is the story on these tutorials?  Is it something you can
> > distribute, or did most of it come off of the top your head?
> 
> Tutorials seems like a deadend for effort.  I've had zero (0)
> responses to my offer of my "Introduction to mod_perl" tutorial.

I'd be interested - although I hope I am beyond that stage now ;-).

I would like to see these sorts of things and "success stories" - how
ever short in the web to do a bit of advocay and (hopefully) attract
more developers (and mindshare).

Subliminal hint - www.take23.org

> 
> If nobody's interested in increasing the number of mod_perl
> programmers through tutorials, then the only other option I can think
> of is strategically-placed success stories.

agreed.

> 
> I know that perl.oreilly.com is making a point of collecting Perl
> success stories and is always hungry for more.  They won't convert
> the unwashed there, though.
> 
> It'd sure be nice to have a WebTechniques special issue on mod_perl.
> Hint, hint, Randal :-)

nudges from here as well ;-)


Greg
> 
> Nat



Has anyone built mob_perl on SuSE 7 or RH 7???

2000-12-13 Thread Carson, Chuck


I have been trying to no end to get mod_perl-1.24 to compile with
Apache-1.3.14 on SuSE 7.0 and Red Hat 7.0. Here are some procedures I have
tried. Note, each time I have started with freshly upacked tarballs of
mod_perl-1.24 and apache-1.3.14.

1) unpack and configure apache:
./configure --prefix=/usr/local/apache --enable-module=all
make;make install
2) unpack and configure mod_perl:
perl Makefile.PL
Here is the resulting output:
BEGIN
bilabong:/usr/local/src/mod_perl-1.24 ===>perl Makefile.PL 
Enter `q' to stop search
Please tell me where I can find your apache src
 [../apache_x.x/src] /usr/local/src/apache_1.3.14/src
Configure mod_perl with /usr/local/src/apache_1.3.14/src ? [y] 
Shall I build httpd in /usr/local/src/apache_1.3.14/src for you? [y] n
* WARNING *

  Apache Version 1.3.0 required, aborting...

* WARNING *
END

If I try and have it build httpd for me, here is what I get:

BEGIN
bilabong:/usr/local/src/mod_perl-1.24 ===>perl Makefile.PL 
Enter `q' to stop search
Please tell me where I can find your apache src
 [../apache_x.x/src] /usr/local/src/apache_1.3.14/src
Configure mod_perl with /usr/local/src/apache_1.3.14/src ? [y] 
Shall I build httpd in /usr/local/src/apache_1.3.14/src for you? [y] 
Appending mod_perl to src/Configuration
Using config file: /usr/local/src/mod_perl-1.24/src/Configuration
Creating Makefile
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in support
Creating Makefile in regex
Creating Makefile in os/unix
Creating Makefile in ap
Creating Makefile in main
Creating Makefile in lib/expat-lite
Creating Makefile in modules/standard
EXTRA_CFLAGS: -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite
-DNO_DL_NEEDED
* WARNING *

  Apache Version 1.3.0 required, aborting...

* WARNING *
END


I have successfully built Apache-1.3.14 with PHP4 including oracle, mysql,
and xml support, however, mod_perl fails miserably. NOTE: I am simply trying
to get mod_perl installed with a cherry version of Apache, I have long ago
gave up trying to get it built with PHP as well. 

Any help is greatly appreciated.

Thanks,
Chuck






Re[2]: Mod_perl tutorials

2000-12-13 Thread Allen Wilson


Good morning...

I for one...would like to see some tutorials. I am just starting to use mod_perl
and it hard getting a firm start.

Allen

Reply Separator
Subject:Re: Mod_perl tutorials
Author: Nathan Torkington <[EMAIL PROTECTED]>
Date:   12/13/00 11:08 AM

J. J. Horner writes:
> What is the story on these tutorials?  Is it something you can
> distribute, or did most of it come off of the top your head?

Tutorials seems like a deadend for effort.  I've had zero (0)
responses to my offer of my "Introduction to mod_perl" tutorial.

If nobody's interested in increasing the number of mod_perl
programmers through tutorials, then the only other option I can think
of is strategically-placed success stories.

I know that perl.oreilly.com is making a point of collecting Perl
success stories and is always hungry for more.  They won't convert
the unwashed there, though.

It'd sure be nice to have a WebTechniques special issue on mod_perl.
Hint, hint, Randal :-)

Nat

THIS MESSAGE MAY CONTAIN PROPRIETARY OR CONFIDENTIAL
COMPANY INFORMATION. ANY UNAUTHORIZED USE OR DISCLOSURE
IS PROHIBITED.



Re: DHTML Support in CGI/Perl

2000-12-13 Thread dreamwvr



hi ,
 DHTML is simply a
subset of SGML .. IMHO anyhow.. perl will support
pretty much anything if your ready and willing to get your hands dirty;-))
Manhar Goindi wrote:

Hi, Does
CGI/Perl support DHTML?  Is there any reference material available
where we can get this information whether it is possible to dynamically
generate web pages from CGI/Perl. If
this is not the right forum pertaining to this discussion, then could you
send me the e-mail address of the forum where I can pose my queries?  Thanks
& Best Regards,Manhar
Goindi





Re: Mod_perl tutorials

2000-12-13 Thread Nathan Torkington

J. J. Horner writes:
> What is the story on these tutorials?  Is it something you can
> distribute, or did most of it come off of the top your head?

Tutorials seems like a deadend for effort.  I've had zero (0)
responses to my offer of my "Introduction to mod_perl" tutorial.

If nobody's interested in increasing the number of mod_perl
programmers through tutorials, then the only other option I can think
of is strategically-placed success stories.

I know that perl.oreilly.com is making a point of collecting Perl
success stories and is always hungry for more.  They won't convert
the unwashed there, though.

It'd sure be nice to have a WebTechniques special issue on mod_perl.
Hint, hint, Randal :-)

Nat



Re: Help me beat Java.

2000-12-13 Thread G.W. Haywood

Hi all,

On Wed, 13 Dec 2000, Vivek Khera wrote:

> j> 3. Is there a way to precomplie perl to machine code to
> 
> Don't think so, but there could be.

There's a Perl to C translator but I don't tink you want to go there.

73,
Ged.





Mod_perl tutorials

2000-12-13 Thread J. J. Horner

Jeff,

I was looking around Stas' site and found a discussion in which you 
stated that you taught some underlings about mod_perl in 2 five hour sessions.

What is the story on these tutorials?  Is it something you can distribute, or 
did most of it come off of the top your head?

Thanks,
Jon

-- 
J. J. Horner
[EMAIL PROTECTED]

Apache, Perl, mod_perl, Web security, Linux


 PGP signature


memory leak in win32

2000-12-13 Thread Son Chang

Hi,

I'm experiencing a memory leak with Apache 1.3.14 with mod_perl 1.23 and
perl5.6.0 on Windows NT4.0 and Windows2000.
I've been running some test with a very simple ModPerl handler which just
outputs an HTML page with hello world in it.  Also, I made sure to undef all
variables that I use.
In general, the child processes grow with each request.
Also, if I set MaxRequestsPerChild to 20 so the child process dies and
restarts after every 20 request, this fixes the problem for the child
processes.  However, with this configuration, there's a memory leak
problem with the parent process.  After the child process dies and
restarts, the parent process grows in size.  This happens every time the
child process dies and restarts.
So with either configuration, I have a memory leak problem.
What can I do to fix this problem?

-son





Re: Help me beat Java.

2000-12-13 Thread Vivek Khera

> "j" == jleidigh  <[EMAIL PROTECTED]> writes:

j> faster. But now they want to do super tuning and also
j> compare Resource consumption between JRun/Java Servlets
j> and Apache/mod_perl. My main concern is the fact that
j> apache/mod_perl child proccess can be as big as 12 MB.
j> Specifically my question is

j> 1. Is there a way to make mod_perl multi-threaded?

Not until apache 2.0 and mod_perl 2.0

j> 2. Is there a way to lower this memory consumtion?

Yes. See "The Guide".  If they are going to compare Java servlets,
then you must configure your mod_perl to act as a pure mod_perl server
rather than a server that answers all requests.  This is the
front-end/back-end setup that The Guide describes.

j> 3. Is there a way to precomplie perl to machine code to
j> better perfomance? They are planning to do the same for
j> Java and may gain performance.

Don't think so, but there could be.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Recompiling modperl ?

2000-12-13 Thread Vivek Khera

> "PL" == Petter Larsson <[EMAIL PROTECTED]> writes:

PL> Is it possible to recompile mod_perl to add features (for example
PL> PERL_AUTHEN=1) without having to recompile apache itself ?

If mod_perl is statically linked, then no, you must recompile Apache.
If mod_perl is dynamically linked, then yes, you can recompile just
mod_perl.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Segmentation fault

2000-12-13 Thread Vivek Khera

> "PM" == Per Moeller <[EMAIL PROTECTED]> writes:

PM> The only difference I can see, is that I installed perl 5.6.0 before
PM> installing the mod_perl apache, should that cause any problems?

PM> The system is running on FreeBSD 4.2.

A mod_perl snapshot from CVS as of yesterday works just fine with the
stock perl 5.005_03 that is part of FreeBSD 4.2.  What I do is install
apache+mod_ssl from /usr/ports/www/apache13-modssl, then install
mod_perl from a cvs checked out copy using apxs (just follow the
instructions in README.apaci).

Works great.  As for moving to perl 5.6, I don't know what problems
that would cause.  Perhaps you should try using the latest CVS
snapshot of mod_perl to see if that works.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Mem Sizing tool [was: splitting the code sets across more thanone mod_perl server]

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, martin langhoff wrote:

> 
> hi,
> 
> [now to the list, also]
> 
> maybe all of these mathematical formulae can be made into a
> smallish perl script that grabs this info from `top ax`. I am not sure
> that top is the proper source of memory usage across platforms.
> 
> In fact, as I am not a unix old-timer, I should be asking
> *where* to get that info reliably from. With that info, I could prepare
> such a script ... it'd be quite useful, I'm building a few servers with
> very low memory.
> 
>   Stas wrote (privately) that there is no consistent cross platform
> command that will reliably report memory usage for a given set of
> processes. He also mentioned Apache::GTop, but I was thinking about an
> external script. A script I can call from the command line and will
> evaluate my three HTTPDs and their children, and report global and
> detailed memory usage. 

(sorry it should be GTop)

>   It should be a general purpose tool, not something mod_perl-dependant
> at all. It might be system dependant, of course. It could be checking
> what OS it's on and call the proper command accordingly.

Apache::VMonitor does exactly this, but it's based on GTop. You are
welcome to patch it to use other libraries. And it reports the real memory
usage of any applications that you choose for it to monitor (mysql for
example). 

BTW, the formula was developed especially for Apache::VMonitor :)

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Mem Sizing tool [was: splitting the code sets across more than one mod_perl server]

2000-12-13 Thread martin langhoff


hi,

[now to the list, also]

maybe all of these mathematical formulae can be made into a
smallish perl script that grabs this info from `top ax`. I am not sure
that top is the proper source of memory usage across platforms.

In fact, as I am not a unix old-timer, I should be asking
*where* to get that info reliably from. With that info, I could prepare
such a script ... it'd be quite useful, I'm building a few servers with
very low memory.

Stas wrote (privately) that there is no consistent cross platform
command that will reliably report memory usage for a given set of
processes. He also mentioned Apache::GTop, but I was thinking about an
external script. A script I can call from the command line and will
evaluate my three HTTPDs and their children, and report global and
detailed memory usage. 

It should be a general purpose tool, not something mod_perl-dependant
at all. It might be system dependant, of course. It could be checking
what OS it's on and call the proper command accordingly.



martin



RE: help with custom Error documents/redirection

2000-12-13 Thread Geoffrey Young



> -Original Message-
> From: B. Burke [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 13, 2000 10:44 AM
> To: [EMAIL PROTECTED]
> Subject: help with custom Error documents/redirection
> 
> 
> I'm looking to implement custom error handling, and I'm 
> hitting a snag.
> I'm hoping to do something like on pg.168 of the Eagle book, where you
> have a handler and user $r->prev to get the original request.
> 
> I'm wanting to redirect to 1 of 2 pages, depending on what the
> requested page was.  I plan on using $r->custom_response to do the
> redirection (as shown on pg. 170 of the Eagle bk).
> 
> The problem I'm having is that $r->prev doesn't seem to be getting
> the request.  I setup a  for the handler, and setup an
> ErrorDocument to point to the Location.  It works, except that I can't
> seem to get $r->prev to tell me what the request was.

you know that $r->prev returns a request object, and not anthing specific
(like the previous location), right?  :)

if you're still unable to get it working, try pointing custom_response to a
script that gleans $r->prev->uri and returns the proper response based on
that...  the whole error document cycle is hard to get until you get it.
keep playing and you'll see the light eventually :)

BTW, it's always good (at least I've found) to call
my $prev_uri = $r->prev ? $r->prev->uri : $r->uri;
because if the page/script is accessed directly then $r->prev is undefined
and you get a runtime error.

HTH

--Geoff

> 
> Any help will be greatly appreciated.
> 
> Thanks,
> Brian B.
> 



Re: Article idea: mod_perl + JSP

2000-12-13 Thread Greg Cope

Chris Winters wrote:
> 
> * Gunther Birznieks ([EMAIL PROTECTED]) [001212 23:53]:
> 
> > ...
> >
> > A well-specified app is always easier to code regardless of Java or Perl.
> > Over the years I've become more of a fan of seeing the benefits of good
> > software engineering than really thinking a particular language is a silver
> > bullet.
> 
> Yes -- it really comes down to what a company uses already and what
> it's being used for. My company is developing from scratch a web-based
> front end to a Visual Basic/SQL Server application. We could certainly
> do it faster in Perl (that's just because our Perl background is much
> stronger than our Java background), but having a Java-based solution
> is sexier and therefore more marketable than a Perl-based
> solution. (We are in business to make money, after all.) Is that a
> legitimate reason? I think so, but it's certainly a grey area.
> 
> > With that said though, I still love Perl.
> 
> Me too :-) It's frustrating to be doing something in Java that would
> take a much shorter time in Perl. But then there are things in Java
> that are simpler than Perl as well.
> 

Appologies if I am butting in - but what you apppear to say here is that
you are using JAVA because its sex / marketdriods know of it, yet perl
would be the quicker (and hence cheaper solution ?).  Surley for this
reason you should use perl and persuade the PBH of the cost benefit here
?

This has hit on a point - in that may people choose Java over Perl
because its sexier, which becomes self forfilling, unless we (the perl
community) persaude people that (mod_)perl is sexy


Greg

> 
> Chris
> 
> --
> Chris Winters ([EMAIL PROTECTED])
> Building enterprise-capable snack solutions since 1988.




help with custom Error documents/redirection

2000-12-13 Thread B. Burke

I'm looking to implement custom error handling, and I'm hitting a snag.
I'm hoping to do something like on pg.168 of the Eagle book, where you
have a handler and user $r->prev to get the original request.

I'm wanting to redirect to 1 of 2 pages, depending on what the
requested page was.  I plan on using $r->custom_response to do the
redirection (as shown on pg. 170 of the Eagle bk).

The problem I'm having is that $r->prev doesn't seem to be getting
the request.  I setup a  for the handler, and setup an
ErrorDocument to point to the Location.  It works, except that I can't
seem to get $r->prev to tell me what the request was.

Any help will be greatly appreciated.

Thanks,
Brian B.




Re: Help me beat Java.

2000-12-13 Thread Gunther Birznieks

At 10:24 AM 12/13/00 -0300, jleidigh wrote:
>I have written a awsome mod_perl module for Apache and
>now my companie wants to transform it to Java (ik).

Why would your company want to redevelop something from scratch in another 
language instead of making use of the product they have now that works?

That seems really odd to be in a company that wishes to reinvent the wheel?

>Nothing personal against java but 95% of the program is
>regular expressions. Perl is king in this area. In
>java they are using Oroinc 3rd party classes for the
>regexs. With some prliminary bench mark test of non
>mod_perl perl and Java, perl won being 12-20 times
>faster. But now they want to do super tuning and also
>compare Resource consumption between JRun/Java Servlets
>and Apache/mod_perl. My main concern is the fact that
>apache/mod_perl child proccess can be as big as 12 MB.
>Specifically my question is
>
>1. Is there a way to make mod_perl multi-threaded?

Yes, but not for the benefits you want. It doesn't matter if Perl is 
multi-threaded because two things lag behind -- Apache 2.0 as a 
multithreaded partner and CPAN modules that are within-Perl thread-safe. 
The first will happen given time, the 2nd is a problem that may never be 
solved (at least not for a year or two).

>2. Is there a way to lower this memory consumtion?

Some but not really that much other than being intelligent about 
preloading. Apache 2.0/mod_perl 2.0 models are supposed to be hooking into 
future versions of Perl to separate CODE and DATA segments within Perl 
itself. Right now Perl P-Code is mixed within data in Perl, so 
copy-on-write slowly degrades when it doesn't have to.

>3. Is there a way to precomplie perl to machine code to
>better perfomance? They are planning to do the same for
>Java and may gain performance.

Not really unless you are talking about not using mod_perl. I don't know of 
any servlet engines that exist that can load machine code compiled servlets 
though. I know TowerJ and products like that, but they compile an entire 
Java application, which doesn't fit well in the dynamically loadable apps.

I think when you compile a Java app there is a possibility you may lose 
some capability of integrating with existing Java classesI think a 
similar thing holds true for compiling perl to machine code -- I am not 
sure if its ever gone beyond beta stage technology on Perl though.

Anyway, we know that Java is better at some things. So I think its been 
said here before... Time to market may be an issue for your company. Can 
your company realistically afford to play with Java and do they really need 
those features you mentioned.

Also, Java servlets is an app development technology. Mod_perl is MORE than 
that. But perhaps your company doesn't need that side of mod_perl.

Anyway, Good Luck.

Later,
Gunther





splitting the code sets across more than one mod_perl server

2000-12-13 Thread Stas Bekman

I was going thru some math fixes in the guide that were spotted
surprisingly during my early morning class at YAPC::Europe, and while
re-reading the material I decided to point your attention that it might be
much more memory conserving wise not to pull all the code that you have
into the same mod_perl server, if you can identify at least two code sets
that big and share very little *between* them. 

Since I've just corrected this material, I'm posting it entirely, since
the online version has some minor glitches in math. Hope you find it
useful:

BTW, the formula that I use below is derived from:

   Total_RAM + Shared_RAM_per_Child * (MaxClients - 1)
  MaxClients = ---
  Max_Process_Size

(which is still wrong on the online version, but it almost doesn't affect
the final results :)

=head1 Running More than One mod_perl Server on the Same Machine.

Let's assume that you have two different sets of code which have
little or nothing in common--different Perl modules, no code
sharing. Typical numbers can be four megabytes of unshared and four
megabytes of shared memory for each code set, plus three megabytes of
shared basic mod_perl stuff.  Which makes each process 17MB in size
when the two code sets are loaded. (3MB (server core shared) + 4MB
(shared 1st code set ) + 4MB (unshared 1st code set ) + 4MB (shared
2nd code set ) + 4MB (unshared 2nd code set ). Under this scenario:

   Shared_RAM_per_Child :  11MB
   Max_Process_Size :  17MB
   Total_RAM: 251MB

We assume that four megabytes is the size of each code sets unshared
memory. This is a pretty typical size of unshared memory, especially
when connecting to databases, as the database connections cannot be
shared. Databases like Oracle can take even more RAM per connection on
top of this.

Let's assume that we have 251 megabytes of RAM dedicated to the
webserver.

According to the equation developed in the section: "L":

Total_RAM - Shared_RAM_per_Child
  MaxClients = ---
   Max_Process_Size - Shared_RAM_per_Child


  MaxClients = (251 - 11)/(17-11) = 40

We see that we can run 40 processes, using the given memory and the
two code sets in the same server.

Now consider this practical decision. Since we have recognized that
the code sets are very distinct in nature and there is no significant
memory sharing in place, the wise thing to do is to split the two code
sets between two mod_perl servers (a single mod_perl server actually
is a set of the parent process and a number of the child
processes). So instead of running everything on one server, now we
move the second code set onto another mod_perl server. At this point
we are talking about a single machine.

Let's look at the figures again. After the split we will have 20
servers of eleven megabytes (4MB unshared + 7mb shared) and another 20
more of the same kind.

How much memory do we need now? From the above equation we derive:

  Total_RAM = MaxClients * (Max_Process_Size - Shared_RAM_per_Child)
  + Shared_RAM_per_Child

And using the numbers (the total of 40 servers):

  Total_RAM = 2 * (20*(11-7)+7) = 174

A total of 174MB of memory required. But, hey, we have 251MB of
memory. We've got 77MB of memory freed up. If we recalculate again the
C we will see that we can run almost 60 servers:

  MaxClients = (251 - 7*2)/(11-7) = 59

So we can run about 19 more servers using the same memory size. Almost
30 servers for each code set instead of 20 originally. We have
enlarged the servers pool by half without changing the machine's
hardware.

Moreover this new setup allows us to fine tune the two code sets,
since in reality the smaller in size code base might have a higher hit
rate, so we can benefit even more.

Let's assume that based on the usage statistics we know that the first
code set is called in 70% of requests and the other 30% are used by
the second set. Now we assume that the first code set requires only
5MB of RAM (3MB shared plus 2MB unshared) over the basic mod_perl
server size, and the second set needs 11MBytes (7MB shared and 4MB
unshared).

Lets compare this new requirement with our original 50:50 setup (qhere
we have assigned the same number of clients for each code set).

So now the first mod_perl server running the first code set will have
all its processes using 8MB (3MB (server shared) + 3MB (code shared) +
2MB (code unshared), and the second 14MB (3+7+4).  Given that we have
a 70:30 hits relation and that we have 251MB of available memory, we
have to solve these two equations:

  X/Y = 7/3

  X*(8-6) + 6 + Y*(14-10) + 10 = 251

where X is the total number of the processes the first code set can
use and Y the second. The first equation reflect the 70:30 hits
relation, and the second uses the equation for the total memory
requirements for the given number of servers and the shared and
unshared memory sizes.

Re: Problems with Apache::ASP, SSI/Filter, and Redirects

2000-12-13 Thread Mark T. Dame

"Mark T. Dame" wrote:
> 
> Joshua Chamas wrote:
> >
> > Your exact config worked for me, I have the latest installed
> > of everything ( 2.07 is latest ASP ) and I got:
> 
> CPAN only has 2.03...

OK, I found and installed 2.07 and I get the same results...


-m
-- 
## Mark T. Dame:  mailto:[EMAIL PROTECTED]
## WWW:  http://www.mfm.com/~mdame/
## MFM Communication Software:  http://www.mfm.com/
"The opposed thumb is one of the defining characteristics of our
 species, and mine are strongly opposed to working pointing devices."
  -- Bill Machrone, PC Magazine, Sep. 28, 1993, discussing
  miniature trackballs



Re: Problems with Apache::ASP, SSI/Filter, and Redirects

2000-12-13 Thread Mark T. Dame

Joshua Chamas wrote:
> 
> Your exact config worked for me, I have the latest installed
> of everything ( 2.07 is latest ASP ) and I got:

CPAN only has 2.03...

 
> I would check the error_log, 

The error log didn't give anything (except the "need AuthName" warning).


> and double check that you have
> EVERYTHING built for mod_perl failing there being anything
> in the error_log.  

I triple checked it.  In fact, I did a make distclean and rebuilt
Apache/mod_perl just to make sure.  I get the same results.


-m
-- 
## Mark T. Dame:  mailto:[EMAIL PROTECTED]
## WWW:  http://www.mfm.com/~mdame/
## MFM Communication Software:  http://www.mfm.com/
"The opposed thumb is one of the defining characteristics of our
 species, and mine are strongly opposed to working pointing devices."
  -- Bill Machrone, PC Magazine, Sep. 28, 1993, discussing
  miniature trackballs



Re: Help me beat Java.

2000-12-13 Thread Nigel Hamilton


> I have written a awsome mod_perl module for Apache and 
> now my companie wants to transform it to Java (ik). 
> Nothing personal against java but 95% of the program is 
> regular expressions. Perl is king in this area. In 
> java they are using Oroinc 3rd party classes for the 
> regexs. With some prliminary bench mark test of non 
> mod_perl perl and Java, perl won being 12-20 times 
> faster. But now they want to do super tuning and also 
> compare Resource consumption between JRun/Java Servlets 
> and Apache/mod_perl. My main concern is the fact that 
> apache/mod_perl child proccess can be as big as 12 MB. 
> Specifically my question is
> 
> 
> 2. Is there a way to lower this memory consumtion?
> 


I haven't had time to look into this, but Gunther mentioned a new module
CGI::SpeedyCGI  this enables persistent perl processes, outside of
Apache. Could you reduce the number of Apache Children and replace them
with SpeedyCGI backends? 

This should save memory and give you more waiting processes to answer
requests!

I haven't tested this  but would be interested to know if anyone has
done this comparison?

I suppose it depends on whether or not you are using Apache:: modules that
need to be tied into the server --- if not, then maybe SpeedyCGI will save
you some memory?


NIge






Re: Help me beat Java.

2000-12-13 Thread Stas Bekman

[some intro snipped]
> and Apache/mod_perl. My main concern is the fact that 
> apache/mod_perl child proccess can be as big as 12 MB. 

even as big as 12.5MB :)

> Specifically my question is
> 
> 1. Is there a way to make mod_perl multi-threaded?

http://perl.apache.org/~dougm/modperl_2.0.html

> 2. Is there a way to lower this memory consumtion?

http://perl.apache.org/guide/performance.html
http://perl.apache.org/guide/performance.html#Know_Your_Operating_System

> 3. Is there a way to precomplie perl to machine code to 
> better perfomance? They are planning to do the same for 
> Java and may gain performance. 

see #2

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/  





Re: [OT]umm...WTFM? [Re: advocacy]

2000-12-13 Thread darren chamberlain

Paul ([EMAIL PROTECTED]) said something to this effect:
> I was working on an article for http://take23.org/ and thought I'd link
> to the basic documentation you get with "perldoc Apache" after you've
> installed mod_perl and I can't find a copy online.
> 
> Anybody point me to one? 

How about 
http://search.cpan.org/doc/DOUGM/mod_perl-1.24_01/Apache/Apache.pm

...but it would be interesting to have a searchable copy on take23.org.

(darren)

-- 
Don't create a problem for which you do not have the answer.



Help me beat Java.

2000-12-13 Thread jleidigh

I have written a awsome mod_perl module for Apache and
now my companie wants to transform it to Java (ik).
Nothing personal against java but 95% of the program is
regular expressions. Perl is king in this area. In
java they are using Oroinc 3rd party classes for the
regexs. With some prliminary bench mark test of non
mod_perl perl and Java, perl won being 12-20 times
faster. But now they want to do super tuning and also
compare Resource consumption between JRun/Java Servlets
and Apache/mod_perl. My main concern is the fact that
apache/mod_perl child proccess can be as big as 12 MB.
Specifically my question is

1. Is there a way to make mod_perl multi-threaded?

2. Is there a way to lower this memory consumtion?

3. Is there a way to precomplie perl to machine code to
better perfomance? They are planning to do the same for
Java and may gain performance.

Help me beat Java, please.
_
UOLMAIL - Todo Argentino tiene derecho a tener su e-mail.
http://www.uolmail.com.ar





Re: Article idea: mod_perl + JSP

2000-12-13 Thread Chris Winters

* Gunther Birznieks ([EMAIL PROTECTED]) [001212 23:53]:
> 
> Of course, we have a toolkit that we use to develop apps in both Perl and 
> Java which helps, but it's still interesting that business logic for people 
> experienced in the language of their choice isn't that bad in terms of 
> delivery time. Of course, maintenance is another issue.

yup.
 
> Ah but have you looked at taglibs? We rarely ever put Java processing on 
> the page itself.

I have, but they seemed more complex than was necessary --
particularly for explaining what's what to a graphical designer. I
will take your experience to heart, however, and give them a second
look :-)
 
>...
>
> As for logic in a JSP... Well, the above is an example of something where 
> you need code for the display to work well.

I just find it annoying that simple things like loops and such are not
as easy as they should be -- Perl (and the Template Toolkit) have
trained me well :-) This is part of what initially drew me to WebMacro
-- that, plus the author's insistence on a forcible separation between
presentation and logic. Leaving the door open to executing Java (or
Perl for that matter) within a page means that someone will walk
through it and start writing mini-programs in the template because
it's "easy", leaving (IMO) an unmaintable mess.

> The downside of taglibs is that they are complex, however taglibs aren't 
> THAT bad. In our framework every JSP page has at least 3 sets of taglibs 
> (more can be added if they are generic and serve a purpose)..
> 
> Framework level -- These are our utility taglibs.
> App level -- These are taglibs that represent app information
> Page level -- Each JSP page, like it or not, has information that it needs 
> to display specific to itself.

Sure -- I tend to break things down like this as well. (The
OpenInteract framework does this, although the second and the third
tend to blend together.)

> The nice thing is that our web designer just needs a cheatsheet of taglib 
> and what it does and doesn't have to worry about any other syntax.

Again, I'll trust your experience.

> The main bad thing about this is that when we spec out a project, each 
> "view" on the application we spec out as 2 days instead of 1 day of work in 
> the equivalent Perl because coding the taglibs gets to be a pain.
> 
> This may seem like overall project delivery time is increased, and it is... 
> a bit. But the majority of a webapp is not necessarily the screens. It's 
> the logic underneath, so our timelines don't really end up growing that 
> much in the scheme of a project.

Makes sense.

> But we do get a better maintenance time because the JSPs are really 
> divorced entirely from Java code allowing a web designer to change things 
> at will without having to worry about an artificial . We almost never embed 
> Java inside a JSP.

This is everyone's aim, I think. Finding the right balance and
applying it for the vast majority of users in the templating language
is very difficult -- although there are probably sufficiently many
templating languages to suit you depending on the balance you
personally would like to strike :-)

> There are preprocessors that help with this. But of course, you have to 
> always remember to compile step to include the preprocessor. And then you 
> still have the issue of variable interpolation.. Another thing annoying not 
> to have. :)

Yep, I don't want to even go there.
 
> I agree. It is quite extensible. We racked our heads long and hard last 
> June when we started full-on development of open source Java apps as to 
> which toolkit to use. In the end, WebMacro and the others have really not 
> caught on in a huge way. JSPs are what a lot of developers we interview 
> these days do know. So it was easier for us to go with the "standard".

Also another important point, although good programmers can pick up
anything -- and a templating language is on the simpler side of things.

> However, keep in mind that JSPs are one part of a generic web application. 
> There's still authentication, logging, datasource manipulation, session 
> mgmt, resource locking, handling incoming data (form validation, untaint, 
> transformation), having a framework to implement model,view,controller (eg 
> struts project for Servlets/JSP), etc...

Oh, yeah, absolutely.

> ...
>
> A well-specified app is always easier to code regardless of Java or Perl. 
> Over the years I've become more of a fan of seeing the benefits of good 
> software engineering than really thinking a particular language is a silver 
> bullet.

Yes -- it really comes down to what a company uses already and what
it's being used for. My company is developing from scratch a web-based
front end to a Visual Basic/SQL Server application. We could certainly
do it faster in Perl (that's just because our Perl background is much
stronger than our Java background), but having a Java-based solution
is sexier and therefore more marketable than a Perl-based
solution. (We 

  1   2   >