Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Conceptualizing

by Spenser (Friar)
on Dec 16, 2001 at 08:21 UTC ( #132302=note: print w/replies, xml ) Need Help??


in reply to Re: Conceptualizing
in thread Conceptualizing

I probably should be ashamed to say this, but I tend to use the words script and program interchangably.  However, I think that the word script is appropriate here as you're (chromatic) implying:  Each of my .cgi files have minimal functions (keeping with Unix Philosophy).  Some create a web page for displaying a "form" for the user to fill out and "submit" for "post"ing.  Some read in data from previous scripts (via CGI.pm and HTML forms and some parsing I ripped off from O'Reilly--subparseform.lib) and process the data (e.g., update a mySQL database).  I do have some "require" lines that call upon a couple library (.lib) files that contain common functions.  Maybe these are causing me trouble.

Alright, now we're getting complicated and getting involved too much in fixing my immediate problem, which isn't as important for me as my grasping the concept of "new CGI" (and I guess from what you're telling me, object oriented programming).  Grasping the concept, I believe, will solve the immediate problem and future ones.

You mentioned that if I call new() within the same process, I'll run into trouble.  This seems to be the effect (the trouble, that is) that I'm experiencing.  It also seems to be touching on the subtle conceptual aspect that I was suspecting:  namely, although I may use new() in two separate .cgi files, by passing data from one to the other in this object bundle, as you put it, or $q, as I coded it, am I wiping out the data within $q with another new() in the second script by invoking it before I can parse the data into my string variables?  Boy, that was a long-winded question.  Put simply, if I were to alternate from $q and $x, or if I were to not declare new() until after I parse and save my data into string variables, would that solve my problem?  Okay, another long-winded sentence--it seems unavoidable for me when discussing such a concept and trying to apply it.  I'll stop here and let you and others respond, if you all would be so kind.

Oh, and thanks for all of the postings thus far.  They have been helpful.  I've been playing with the practical suggestions and pondering the conceptual ones.  I think I'm getting closer.  Of course, that may yet to be determined.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://132302]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2022-08-19 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?