perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <jos...@chamas.com>
Subject Re: Seg faults executing sql within perl sub routine
Date Thu, 06 Jun 2002 14:49:11 GMT
Vikash_Chauhan wrote:
> 
> > You can actually have subroutines defined in ASP scripts, but you
> > have to code them carefully to make sure that all variables
> > used in the script are localized with my() and passed in via @_.
> > You can move a subroutine definition to the global.asa file,
> > and have that subroutine shared safely between scripts.
> 
> Sorted.  I passed the db handle (considering it's a recursive sub
> routine) into the sub each time it's called, and voila, problem
> solved - No more segmentation faults.
> 
> Still don't understand why this only happens (I think) within the ASP
> tags, but I'll quit while I'm ahead.
> 

I'm glad you got it to work.  Here's a few tricks that will
take you far.  Always set UseStrict, and never define subs
directly in your ASP scripts.  You can but I just would not 
advise it.

--Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message