RE: slight mod_perl problem

2000-12-20 Thread Douglas Wilson

Would this be the reason?
http://perl.apache.org/guide/config.html#Apache_Restarts_Twice_On_Start

 -Original Message-
 From: Jamie Krasnoo [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 20, 2000 3:21 PM
 To: [EMAIL PROTECTED]
 Subject: slight mod_perl problem


 Ok, it seems that my startup.pl is being run twice on server start.

 Startup init running
 startup.pl - loading templates into memory
 --- Loaded template file user_reg.tmpl
 Startup init running
 startup.pl - loading templates into memory
 --- Loaded template file user_reg.tmpl
 [Wed Dec 20 15:18:21 2000] [notice] Apache/1.3.14 (Unix) mod_perl/1.24_01\
 configured -- resuming normal operations

 Anyone have an explanation as to why this is happening, I have no hair
 left due to trying to figure this one out.


 Thanks for your help,

 Jamie







RE: database access

2000-11-08 Thread Douglas Wilson



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Greg Cope
 Sent: Tuesday, November 07, 2000 10:53 AM
 To: Jason Liu
 Cc: [EMAIL PROTECTED]
 Subject: Re: database access


 Jason Liu wrote:
 
  Is Apache::DBI absolutely necessary if you want to establish persistent
  database connection per child?

 No you can write your own (its open source remember ;-) but why bother -
 standing on the shoulders of giants etc 

Well, there is a section in the mod_perl guide on the subject here:
http://perl.apache.org/guide/performance.html#Efficient_Work_with_Databases_
un




RE: JOB - NYC - Looking for a Linux/Apache/mod_perl/mysql programmer

2000-09-15 Thread Douglas Wilson



 -Original Message-
 From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 15, 2000 11:12 AM
 To: Justin
 Cc: [EMAIL PROTECTED]
 Subject: Re: JOB - NYC - Looking for a Linux/Apache/mod_perl/mysql
 programmer


 On Fri, 15 Sep 2000, Justin wrote:

  Hi,
  We just placed a little job ad targetted at New York city residents on
  dslreports.com. we're looking for an enthusiastic employee #4 who is
  very comfortable with apache/modperl/linux/mysql
 
  We cannot give an accurate job description, because there is so much
  we need to DO, you can carve out your own area if you can convince me
  and my partner. It could be:
* community/forum coding
* and/or .. network monitoring (for users) systems coding
* and/or .. mysql related work (optimizations, upgrades, etc)
* and/or .. web design within the constraints of a modperl setup
* and/or .. a little sysadmin (if you like that)
* and/or .. automation of security scan tools
* and/or .. a bit of java applet work
 
  dslreports.com has a lot of daily users and gets a lot of feedback,
  so if you enjoy the idea of giving users what they want, and doing
  it fast, without focus groups and without a lot of project management,
  then this position would be ideal for you..
 
  Telecommuting is fine : unlimited DSL provided to your home. come to
  the office every second day if you prefer ..

 Wow, thats an awesome offer for me - do you have the cash to persuade BT
 to pipe DSL to my home? And flights to NY every other day would be neat
 (but a little tiring) :-)

No thanks, I've already done the LAX-Indiana commute every week for a year.
No way would I do it every other day :) Besides, my mod_perl experience is
a little light. Although I WILL be at the Perl U mod_perl class when it
comes to L.A. (I haven't seen a plug for that yet here, so here it is) :)




RE: [ANNOUNCE] Apache::Reload 0.04

2000-08-30 Thread Douglas Wilson

Forgive me if this is a stupid question, but I am rather
ignorant in regards to mod_perl, and I'm curious about
something.

If you reload modules, does that increase the size of the
forked children of the parent process? Or does just the
parent reload, with the children having to die and respawn?
Or do we care? :)

TIA,
Douglas Wilson



RE: getting rid of nested sub lexical problem

2000-08-16 Thread Douglas Wilson



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 16, 2000 2:17 AM
 To: [EMAIL PROTECTED]
 Subject: getting rid of nested sub lexical problem

 Below is a processed version of the increment_counter example from the
 guide that works as expected.

 --Chris

   #!/usr/bin/perl -w
   use strict;

   for (1..3){
   print "run: [time $_]\n";
   run();
   }

   sub run {

   my $counter = 0;

   increment_counter();
   increment_counter();

   sub increment_counter {{sub{
   $counter++;
   print "Counter is equal to $counter !\n";
   }}}

   } # end of sub run



That gives me a 'Variable "$counter" may be unavailable at ./tst2 line 17.'
warning. And its sort of obfuscated (to me, anyway). I'd probably do it this
way:

#!/usr/local/bin/perl -w

use strict;

#!/usr/bin/perl -w
use strict;

for (1..3){
print "run: [time $_]\n";
run();
}

{
 my $counter;

 sub run {
$counter = 0;

print $counter,"\n";

increment_counter();
increment_counter();

 }
 sub increment_counter {
   $counter++;
   print "Counter is equal to $counter !\n";
 }
}




RE: Client filehandle?

2000-08-02 Thread Douglas Wilson



 -Original Message-
 From: Todd Caine [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 02, 2000 1:30 PM
 To: mod_perl
 Subject: Client filehandle?
 
 
 I've got a Perl Module which has a function called
 RRDs::graph($args), that will only print to stdout.  In my
 handler I write something similar to:
 
 sub handler {
   my $r = shift;
 
   #  I want the output to go to the client, ($r-print()),
 but instead it will only go to STDOUT

 So I was trying something like:
 
 *STDOUT = \*r{IO};

Maybe (and I mean MAYBE):
local *STDOUT = \*$r;

HTH,
Douglas Wilson



RE: Client filehandle?

2000-08-02 Thread Douglas Wilson



 -Original Message-
 From: Douglas Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 02, 2000 3:24 PM
 To: Todd Caine; mod_perl
 Subject: RE: Client filehandle?

 Maybe (and I mean MAYBE):
 local *STDOUT = \*$r;

And of course, that should have been
(hey I'm making it up  learning as I go along):
local *STDOUT = $r;

HTH,
Douglas Wilson



RE: How to use warnings in Apache::ASP?

2000-07-31 Thread Douglas Wilson



 -Original Message-
 From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, July 29, 2000 7:28 PM
 To: Philip Mak
 Cc: [EMAIL PROTECTED]
 Subject: Re: How to use warnings in Apache::ASP?
 
 
 Philip Mak wrote:
  
  Is there a way to make it so that all Apache::ASP scripts on my 
 site have
  "use warnings;" on by default (something analogous to 
 PerlSetVar Strict 1
  and use strict;)? Or do I just have to put "use warnings;" in 
 every file?
 
 What does it do?  Never heard of it, same as -w?

warnings is NOT a module (someone called it that
in another post). Its a pragma (new, as of perl 5.6), like
'use strict', which means you can turn it on or off locally in
any block. (Or turn parts of it on or off).

HTH,
Douglas Wilson



RE: Templating system

2000-07-27 Thread Douglas Wilson


 -Original Message-
 From: Paul J. Lucas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 27, 2000 10:11 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Templating system
 
 
 On Thu, 27 Jul 2000, Jeffrey W. Baker wrote:
 
  On Thu, 27 Jul 2000, Paul J. Lucas wrote:
  
 http://www.best.com/~pjl/software/html_tree/

I've been researching templating systems for the past few days,
I come in this morning, and here's 40 or so posts on the very
subject. I've been wanting one where the template is as much like
plain html as possible, and this seems to fit the bill.

Until now I've been leaning toward the Template Toolkit, if only
because the template elements can be filled in with other templates
(maybe that's just in the beta version, I forget). We'd like to just
have a standard Header/Footer, but have the Header  Footer be
based on what client we're hosting, and the only template kit
I could see that had variable includes was HTML::DynamicTemplate.

I'm going to have to make some decision soon, so we can start getting
some work done :)

Can anyone point me to some examples (to accelerate the learning
curve) with this HTML::Tree?? Or any other pointers, opinions?

TIA,
Douglas Wilson



RE: Templating system

2000-07-27 Thread Douglas Wilson



 -Original Message-
 From: Paul J. Lucas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 27, 2000 10:11 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Templating system
 
 
 On Thu, 27 Jul 2000, Jeffrey W. Baker wrote:
 
  On Thu, 27 Jul 2000, Paul J. Lucas wrote:
  
 http://www.best.com/~pjl/software/html_tree/

Is there a reason this is not on CPAN? It would have been
nice to come up in a search. (I actually searched for 'template',
so I'm not sure I would have ever found it anyway :)

Cheers,
Douglas Wilson