On 18 Sep 98, at 10:33, Jack Killpatrick wrote:

> > I think that everyone who uses perl extensivley ought to move to
> > mod_perl or an equivalent.  But it is a different piece of cake.
> 
> I haven't tried mod_perl yet, but believed the "advertising" stating that I
> could use any "well-written" code. From your first experience, what's
> different (from the code writing point of view)?

This is going to get complicated and expose my superficial 
understanding of programming -- so don't anyone hesitate to jump in 
with corrections etc.

I don't understand the difference, in perl, of using:

my ($var1,$var2,$var3);

vs.

use vars qw ($var1 $var2 $var3)

other than the obvious.  I would assume no difference.  But you have 
to be very careful about global variables.  And the question of 
scope.  As your script never ENDS those variables might/can hang 
around forever.

I was finding that the script would keep an old value.  I would enter 
a search term, click and search and then enter another search term, 
click and lo and behold the old search was returned.  I am also 
running the Apache::DBI module.

My scripts were written using strict ....  and I did some searching 
and discovered that I might want to use "require CGI.pm" rather than 
"use CGI.pm" owing to .....

Looks like you have to be careful with the other files you require 
etc.  

I have a lot more to learn about this.  I don't think it is as simple 
as stated.  For one thing all the instructions suggest creating a new 
directory for your mod_perl scripts --- if it were so simple why 
create the new directory?  And if you don't use "use strict" or 
localize variables then ..... could be trouble.

But I think this is a must go direction.  Anyone else?

Peter



____________________________________________________________________
--------------------------------------------------------------------
 Join The Web Consultants Association :  Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------

Reply via email to