[perlWebSite-devel] steps for OO
Status: Alpha
Brought to you by:
oubiwann-dep
|
From: McGreggor, D. <DMc...@gp...> - 2002-02-25 20:36:39
|
I haven't received any list mail. Maybe I need to do something else to = set it up... maybe it's being blocked by our firewall... dunno. Anyway, = here's what I was going to send: So, I was wondering - what would it take to make this oo? As an expample, I've got a global variable for the connection to the = database. if I make a wrapper perl mod for all the mods I am using, I = could do something like this: $mySite =3D new perlWebSite(); This should read the config file and do the following according to what = is setup in there: 1) establish a connection to the db 2) start caching 3) start sessions 4) etc. Now, I would assume that this need only be called once during a session, = right? So if 5 .cgi's later I want to do this: $sql =3D "SELECT * from users"; @users =3D $mySite->SQLResultAsArray($sql); I can, and it's going to know all about the $dbh connection that I made = in new perlWebSite(); But, what are the mechanics behind this? I have to = store the object in the session somehow (serialize it? I have to find = out if that is done automatically with the module I am thinking about = using).=20 Any ideas or input? Duncan McGreggor UNIX Administrator General Physics GP e-Learning Hosting Support ----------------------------- 6700 Alexander Bell Drive desk: 410-290-2535 cell: 443-838-6269 |